From 4014013d058581fc089c8567db7f12de2b9ec730 Mon Sep 17 00:00:00 2001 From: layerdiffusion <19834515+lllyasviel@users.noreply.github.com> Date: Fri, 9 Aug 2024 15:11:07 -0700 Subject: [PATCH] fix text encoder dtype --- backend/loader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/loader.py b/backend/loader.py index 606a33e6..4d60ceb8 100644 --- a/backend/loader.py +++ b/backend/loader.py @@ -51,7 +51,7 @@ def load_huggingface_component(guess, component_name, lib_name, cls_name, repo_p from transformers import CLIPTextConfig, CLIPTextModel config = CLIPTextConfig.from_pretrained(config_path) - to_args = dict(device=memory_management.text_encoder_device(), dtype=memory_management.text_encoder_dtype()) + to_args = dict(device=memory_management.cpu, dtype=memory_management.text_encoder_dtype()) with modeling_utils.no_init_weights(): with using_forge_operations(**to_args, manual_cast_enabled=True):