mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-04-30 03:01:15 +00:00
fix text encoder dtype
This commit is contained in:
@@ -51,7 +51,7 @@ def load_huggingface_component(guess, component_name, lib_name, cls_name, repo_p
|
|||||||
from transformers import CLIPTextConfig, CLIPTextModel
|
from transformers import CLIPTextConfig, CLIPTextModel
|
||||||
config = CLIPTextConfig.from_pretrained(config_path)
|
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 modeling_utils.no_init_weights():
|
||||||
with using_forge_operations(**to_args, manual_cast_enabled=True):
|
with using_forge_operations(**to_args, manual_cast_enabled=True):
|
||||||
|
|||||||
Reference in New Issue
Block a user