executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
qwen-image-workflowsOperate Qwen-Image, Qwen-Image-Edit, Lightning, 2509, ControlNet, and offload workflows with Nunchaku quantized transformers.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when a task involves Qwen-Image text-to-image, Qwen-Image-Edit, Qwen-Image-Edit-2509, Qwen Lightning variants, Qwen ControlNet, or Qwen-specific transformer offload in an installed nunchaku environment.
Do not use this sub-skill for FLUX-only LoRA/adapters or custom Qwen LoRA training/loading. The Qwen docs describe custom LoRA support as under development; use only the pre-quantized Lightning assets documented for Qwen workflows.
| Need | Start here |
|---|---|
| Basic Qwen-Image generation | references/qwen-workflows.md#text-to-image-workflows |
| Qwen-Image-Lightning 4/8-step generation | references/qwen-workflows.md#lightning-scheduler-and-step-counts |
| Qwen-Image-Edit with one input image | references/qwen-workflows.md#edit-workflows |
| Qwen-Image-Edit-2509 or multi-image edit | references/qwen-workflows.md#2509-edit-plus-workflows |
| Qwen ControlNet Union routing | references/qwen-workflows.md#controlnet-routing |
| Low-VRAM Qwen inference | references/qwen-workflows.md#offload-patterns |
| Failure diagnosis | references/troubleshooting.md |
| Parameterized local template | scripts/qwen_image_template.py |
QwenImagePipeline, QwenImageEditPipeline, QwenImageEditPlusPipeline, or QwenImageControlNetPipeline).NunchakuQwenImageTransformer2DModel.from_pretrained(...) and pass it into pipeline.from_pretrained(..., transformer=transformer, torch_dtype=...)..safetensors/.sft checkpoint path or Hugging Face file path to from_pretrained; do not pass a model directory.torch.float16 on Turing-class GPUs and usually torch.bfloat16 elsewhere; set dtype during from_pretrained, not by casting the quantized model after load.transformer.set_offload(True, ...), append "transformer" to the pipeline CPU-offload exclusion list, and then call Diffusers sequential CPU offload.diffusers>=0.36 when those classes are needed.import torch
from diffusers import QwenImagePipeline
from nunchaku import NunchakuQwenImageTransformer2DModel
transformer = NunchakuQwenImageTransformer2DModel.from_pretrained(
"nunchaku-tech/nunchaku-qwen-image/svdq-int4_r32-qwen-image.safetensors",
torch_dtype=torch.bfloat16,
)
pipe = QwenImagePipeline.from_pretrained(
"Qwen/Qwen-Image", transformer=transformer, torch_dtype=torch.bfloat16
)
pipe.to("cuda")
image = pipe(prompt="a clean storefront sign that reads Nunchaku", num_inference_steps=50, true_cfg_scale=4.0).images[0]
For complete generation/edit templates and offload-safe variants, use references/qwen-workflows.md and scripts/qwen_image_template.py.
Distilled from the Qwen usage docs, Qwen examples, Qwen native test candidates, live public API inspection, and NunchakuQwenImageTransformer2DModel source behavior. Native Qwen tests/examples are verification candidates for later integration; this sub-skill does not claim they were run during drafting.