1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 23:14:49 +08:00

Fix model needing to be loaded on GPU to generate the sigmas.

This commit is contained in:
comfyanonymous
2024-04-04 22:08:49 -04:00
parent 1f8d8e6c77
commit 1a0486bb96
3 changed files with 21 additions and 16 deletions

View File

@@ -28,8 +28,7 @@ class BasicScheduler:
return (torch.FloatTensor([]),)
total_steps = int(steps/denoise)
comfy.model_management.load_models_gpu([model])
sigmas = comfy.samplers.calculate_sigmas_scheduler(model.model, scheduler, total_steps).cpu()
sigmas = comfy.samplers.calculate_sigmas(model.get_model_object("model_sampling"), scheduler, total_steps).cpu()
sigmas = sigmas[-(steps + 1):]
return (sigmas, )