fix auto_cast (#622)
This commit is contained in:
parent
778a3cf81e
commit
53573fa073
|
|
@ -1 +1 @@
|
|||
version = '2.1.36'
|
||||
version = '2.1.37'
|
||||
|
|
|
|||
|
|
@ -455,7 +455,20 @@ def text_encoder_device_patched():
|
|||
return comfy.model_management.get_torch_device()
|
||||
|
||||
|
||||
def patched_get_autocast_device(dev):
|
||||
# https://github.com/lllyasviel/Fooocus/discussions/571
|
||||
# https://github.com/lllyasviel/Fooocus/issues/620
|
||||
result = ''
|
||||
if hasattr(dev, 'type'):
|
||||
result = str(dev.type)
|
||||
if 'cuda' in result:
|
||||
return 'cuda'
|
||||
else:
|
||||
return 'cpu'
|
||||
|
||||
|
||||
def patch_all():
|
||||
comfy.model_management.get_autocast_device = patched_get_autocast_device
|
||||
comfy.samplers.SAMPLER_NAMES += ['dpmpp_fooocus_2m_sde_inpaint_seamless']
|
||||
comfy.model_management.text_encoder_device = text_encoder_device_patched
|
||||
comfy.model_patcher.ModelPatcher.calculate_weight = calculate_weight_patched
|
||||
|
|
|
|||
Loading…
Reference in New Issue