mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-14 01:16:58 +08:00
refine
This commit is contained in:
parent
6898400863
commit
5dc089c045
@ -691,6 +691,8 @@ def text_encoder_offload_device():
|
|||||||
return torch.device("cpu")
|
return torch.device("cpu")
|
||||||
|
|
||||||
def text_encoder_device():
|
def text_encoder_device():
|
||||||
|
if "," in args.cuda_device:
|
||||||
|
return torch.device("cuda", 1)
|
||||||
if args.gpu_only:
|
if args.gpu_only:
|
||||||
return get_torch_device()
|
return get_torch_device()
|
||||||
elif vram_state == VRAMState.HIGH_VRAM or vram_state == VRAMState.NORMAL_VRAM:
|
elif vram_state == VRAMState.HIGH_VRAM or vram_state == VRAMState.NORMAL_VRAM:
|
||||||
|
|||||||
@ -223,6 +223,8 @@ class disable_weight_init:
|
|||||||
else:
|
else:
|
||||||
raise ValueError(f"unsupported dimensions: {dims}")
|
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 manual_cast(disable_weight_init):
|
||||||
class Linear(disable_weight_init.Linear):
|
class Linear(disable_weight_init.Linear):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user