Hack to make zimage work in fp16. (#11057)

This commit is contained in:
comfyanonymous
2025-12-02 14:11:58 -08:00
committed by GitHub
parent 33d6aec3b7
commit daaceac769
2 changed files with 13 additions and 7 deletions

View File

@@ -1027,6 +1027,8 @@ class ZImage(Lumina2):
memory_usage_factor = 1.7
supported_inference_dtypes = [torch.bfloat16, torch.float16, torch.float32]
def clip_target(self, state_dict={}):
pref = self.text_encoder_key_prefix[0]
hunyuan_detect = comfy.text_encoders.hunyuan_video.llama_detect(state_dict, "{}qwen3_4b.transformer.".format(pref))