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

@@ -150,6 +150,12 @@ class ModelPatcher:
def add_object_patch(self, name, obj):
self.object_patches[name] = obj
def get_model_object(self, name):
if name in self.object_patches:
return self.object_patches[name]
else:
return comfy.utils.get_attr(self.model, name)
def model_patches_to(self, device):
to = self.model_options["transformer_options"]
if "patches" in to: