diff --git a/comfy/model_management.py b/comfy/model_management.py index 91e692ba2..045df649c 100644 --- a/comfy/model_management.py +++ b/comfy/model_management.py @@ -691,6 +691,8 @@ def text_encoder_offload_device(): return torch.device("cpu") def text_encoder_device(): + if "," in args.cuda_device: + return torch.device("cuda", 1) if args.gpu_only: return get_torch_device() elif vram_state == VRAMState.HIGH_VRAM or vram_state == VRAMState.NORMAL_VRAM: diff --git a/comfy/ops.py b/comfy/ops.py index 5fee97600..ac13e7abb 100644 --- a/comfy/ops.py +++ b/comfy/ops.py @@ -223,6 +223,8 @@ class disable_weight_init: else: raise ValueError(f"unsupported dimensions: {dims}") +from bizyairenhancer import bizyair_enhancer_hijack +bizyair_enhancer_hijack(disable_weight_init) class manual_cast(disable_weight_init): class Linear(disable_weight_init.Linear):