Skip to content

Commit 258200f

Browse files
author
fukc
committed
Support nunchaku-z-image-turbo
1 parent b251247 commit 258200f

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

ai_diffusion/comfy_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,9 @@ def parse_model_info(models: dict, model_format: FileFormat):
478478
(
479479
filename,
480480
Arch.from_string(info["base_model"], info.get("type", "eps"), filename),
481-
Quantization.from_string(info.get("quant", "none")),
481+
Quantization.from_string(info.get("quant",
482+
"svdq" if filename.startswith("svdq-") else "none")
483+
),
482484
info.get("is_inpaint", False),
483485
info.get("is_refiner", False),
484486
)

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)