"ml/backend/git@developer.sourcefind.cn:OpenDAS/ollama.git" did not exist on "4d4463b2bd5443adc5e86943132ee727550f09b7"
Commit f2d432f9 authored by comfyanonymous's avatar comfyanonymous
Browse files

Fix potential turbo scheduler model patching issue.

parent 4871a364
...@@ -105,9 +105,8 @@ class SDTurboScheduler: ...@@ -105,9 +105,8 @@ class SDTurboScheduler:
def get_sigmas(self, model, steps, denoise): def get_sigmas(self, model, steps, denoise):
start_step = 10 - int(10 * denoise) start_step = 10 - int(10 * denoise)
timesteps = torch.flip(torch.arange(1, 11) * 100 - 1, (0,))[start_step:start_step + steps] timesteps = torch.flip(torch.arange(1, 11) * 100 - 1, (0,))[start_step:start_step + steps]
inner_model = model.patch_model(patch_weights=False) comfy.model_management.load_models_gpu([model])
sigmas = inner_model.model_sampling.sigma(timesteps) sigmas = model.model.model_sampling.sigma(timesteps)
model.unpatch_model()
sigmas = torch.cat([sigmas, sigmas.new_zeros([1])]) sigmas = torch.cat([sigmas, sigmas.new_zeros([1])])
return (sigmas, ) return (sigmas, )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment