Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions ai_diffusion/comfy_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,16 @@ def nunchaku_load_qwen_diffusion_model(self, model_name: str, num_blocks_on_gpu=
use_pin_memory="disable",
)

def nunchaku_load_zimage_diffusion_model(self, model_name: str, num_blocks_on_gpu=1):
return self.add_cached(
"NunchakuZImageDiTLoader",
1,
model_name=model_name,
cpu_offload="auto",
num_blocks_on_gpu=num_blocks_on_gpu,
use_pin_memory="disable",
)

def nunchaku_load_flux_lora(self, model: Output, name: str, strength: float):
return self.add(
"NunchakuFluxLoraLoader", 1, model=model, lora_name=name, lora_strength=strength
Expand Down
2 changes: 2 additions & 0 deletions ai_diffusion/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ def load_checkpoint_with_lora(w: ComfyWorkflow, checkpoint: CheckpointInput, mod
model = w.nunchaku_load_flux_diffusion_model(
model_info.filename, cache_threshold=cache
)
elif model_info.arch == Arch.zimage:
model = w.nunchaku_load_zimage_diffusion_model(model_info.filename)
elif model_info.arch.is_qwen_like:
model = w.nunchaku_load_qwen_diffusion_model(model_info.filename)
else:
Expand Down