fix T5 not baked

This commit is contained in:
layerdiffusion
2024-08-25 17:31:50 -07:00
parent cae37a2725
commit b25b62da96

View File

@@ -104,6 +104,11 @@ def load_huggingface_component(guess, component_name, lib_name, cls_name, repo_p
load_state_dict(model, state_dict, log_name=cls_name, ignore_errors=['transformer.encoder.embed_tokens.weight', 'logit_scale'])
if storage_dtype in ['gguf']:
from backend.operations_gguf import bake_gguf_model
model.computation_dtype = torch.float16
model = bake_gguf_model(model)
return model
if cls_name in ['UNet2DConditionModel', 'FluxTransformer2DModel']:
assert isinstance(state_dict, dict) and len(state_dict) > 16, 'You do not have model state dict!'