Skip to content

Commit

Permalink
Fix potential turbo scheduler model patching issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Jan 22, 2024
1 parent 4871a36 commit f2d432f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions comfy_extras/nodes_custom_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,8 @@ def INPUT_TYPES(s):
def get_sigmas(self, model, steps, denoise):
start_step = 10 - int(10 * denoise)
timesteps = torch.flip(torch.arange(1, 11) * 100 - 1, (0,))[start_step:start_step + steps]
inner_model = model.patch_model(patch_weights=False)
sigmas = inner_model.model_sampling.sigma(timesteps)
model.unpatch_model()
comfy.model_management.load_models_gpu([model])
sigmas = model.model.model_sampling.sigma(timesteps)
sigmas = torch.cat([sigmas, sigmas.new_zeros([1])])
return (sigmas, )

Expand Down

0 comments on commit f2d432f

Please sign in to comment.