Skip to content

Commit c4d54e5

Browse files
fukc-gihtubfukc
andauthored
Support nunchaku-z-image-turbo (#2237)
* Support nunchaku-z-image-turbo * Don't check filename --------- Co-authored-by: fukc <fukc@github.com>
1 parent 15c5f3d commit c4d54e5

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

ai_diffusion/comfy_workflow.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,16 @@ def nunchaku_load_qwen_diffusion_model(self, model_name: str, num_blocks_on_gpu=
568568
use_pin_memory="disable",
569569
)
570570

571+
def nunchaku_load_zimage_diffusion_model(self, model_name: str, num_blocks_on_gpu=1):
572+
return self.add_cached(
573+
"NunchakuZImageDiTLoader",
574+
1,
575+
model_name=model_name,
576+
cpu_offload="auto",
577+
num_blocks_on_gpu=num_blocks_on_gpu,
578+
use_pin_memory="disable",
579+
)
580+
571581
def nunchaku_load_flux_lora(self, model: Output, name: str, strength: float):
572582
return self.add(
573583
"NunchakuFluxLoraLoader", 1, model=model, lora_name=name, lora_strength=strength

ai_diffusion/workflow.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ def load_checkpoint_with_lora(w: ComfyWorkflow, checkpoint: CheckpointInput, mod
105105
model = w.nunchaku_load_flux_diffusion_model(
106106
model_info.filename, cache_threshold=cache
107107
)
108+
elif model_info.arch == Arch.zimage:
109+
model = w.nunchaku_load_zimage_diffusion_model(model_info.filename)
108110
elif model_info.arch.is_qwen_like:
109111
model = w.nunchaku_load_qwen_diffusion_model(model_info.filename)
110112
else:

0 commit comments

Comments
 (0)