Generated reference · ComfyUI workflow · zimage

Z-Image Inpaint

Repaint the white region of a mask image with a Z-Image checkpoint (the 6B base with CFG and a negative prompt, or a Civitai Turbo finetune on its 8-step schedule), with an optional Z-Image LoRA; untouched pixels are composited back from …

zimage20nodesGPU A5000out image~24sv1.0.0

On this page

Repaint the white region of a mask image with a Z-Image checkpoint (the 6B base with CFG and a negative prompt, or a Civitai Turbo finetune on its 8-step schedule), with an optional Z-Image LoRA; untouched pixels are composited back from the source. No upstream Z-Image inpaint template exists at Comfy-Org/workflow_templates@aaac56dd, so the graph is this catalog's chroma-inpaint shape (mask image to mask, GrowMask, VAEEncodeForInpaint, KSampler, ImageCompositeMasked) with the Z-Image model stack and sampler values of templates/image_z_image.json (res_multistep + simple, 25 steps, CFG 4, shift 3) and templates/image_z_image_turbo.json (8 steps, CFG 1, negative zeroed); source and mask are bounded to a longest side of 1024 with the ImageScaleToMaxDimension node templates/image_z_image_turbo_fun_union_controlnet.json uses. Choosing a Turbo checkpoint selects the Turbo schedule through checkpoint_profile.

20Graph nodes
17Node classes
12Inputs
10Models

Tags: zimagerunpod-serverlessvolume-backedinpaint

Inputs (12)#

The typed parameter surface callers bind when they request this workflow. Enum options and numeric bounds are the values the workflow document declares.

promptstringrequireddefault a denim jacket with brass buttons, natural light, sharp focus
Positive prompt describing what to paint inside the mask, in natural prose
negative_promptstringdefault
Negative prompt, honoured by the base checkpoint (CFG-guided; the upstream base template leaves it empty). A Turbo checkpoint samples at CFG 1 with the negative zeroed (ConditioningZeroOut, as the upstream Turbo template does), so this text is not encoded for it.
checkpointenumdefault zimage-base-bf16
Z-Image checkpoint on the network volume. zimage-base-bf16 = Z-Image 6B base (UNETLoader, CFG and negative prompt). cyberrealistic-zimage-turbo-v8-bf16 = CyberRealistic Z-Image Turbo v8.0 bf16 (UNETLoader with the shared Qwen3 4B encoder and Flux ae). zimage-turbo-bf16-aio = Z-Image-Turbo BF16 all-in-one (CheckpointLoaderSimple; encoder and VAE come from the same file). The two Turbo checkpoints run the distilled schedule automatically: 8 steps at CFG 1 with the negative zeroed, whatever steps and cfg say.
options: zimage-base-bf16cyberrealistic-zimage-turbo-v8-bf16zimage-turbo-bf16-aio
stepsintegerdefault 25min 8max 60
Sampling steps for the base checkpoint (25 is the upstream base template's value; its note suggests 30-50). Not used by a Turbo checkpoint, which always runs 8.
cfgfloatdefault 4.0min 1.0max 10.0
Classifier-free guidance for the base checkpoint (4 is the upstream base template's value; its note suggests 3-5). Not used by a Turbo checkpoint, which always samples at 1.
seedintegerdefault -1
Random seed (-1 = random)
source_imageimagerequired
Source image. It is scaled so its longest side is 1024 (lanczos) before encoding, which bounds the latent at ~1 MP whatever is uploaded; the output has that size.
mask_imageimagerequired
Black/white mask image, white = repaint, the same size as the source. It is scaled to the same bound as the source (nearest-exact, so it stays black and white).
grow_mask_byintegerdefault 8min 0max 64
Dilate the mask by this many pixels (of the scaled image) before inpainting
denoisefloatdefault 1.0min 0.2max 1.0
Denoise strength inside the mask (the chroma-inpaint default of 1.0; no upstream Z-Image inpaint template sets one)
loraenumdefault none
Optional Z-Image LoRA (A.03.02; see zimage-txt2img). none leaves the graph without a LoRA loader.
options: nonephotoreal-betternudes-v3realistic-snapshot-v5breast-sliderdetail-sliderdetaildaemonz-v1.1
lora_strengthfloatdefault 1.0min -2.0max 2.0
LoRA strength on the model (LoraLoaderModelOnly.strength_model). The sliders are meant to be driven negative as well as positive.

ComfyUI node graph (20)#

The executable ComfyUI prompt graph: 20 nodes across 17 distinct node classes, wired by 15 data dependencies. Nodes tinted green come from a custom node pack this workflow declares; the rest are ComfyUI core / baked-community classes.

flowchart TD n0["1: UNETLoader"] n1["2: CLIPLoader"] n2["3: VAELoader"] n3["4: CheckpointLoaderSimple"] n4["5: LoraLoaderModelOnly"] n5["6: ModelSamplingAuraFlow"] n6["7: CLIPTextEncode"] n7["8: CLIPTextEncode"] n8["9: ConditioningZeroOut"] n9["10: LoadImage"] n10["11: LoadImage"] n11["12: ImageScaleToMaxDimension"] n12["13: ImageScaleToMaxDimension"] n13["14: ImageToMask"] n14["15: GrowMask"] n15["16: VAEEncodeForInpaint"] n16["17: KSampler"] n17["18: VAEDecode"] n18["19: ImageCompositeMasked"] n19["20: SaveImage"] n6 -->|conditioning| n8 n9 -->|image| n11 n10 -->|image| n12 n12 -->|image| n13 n13 -->|mask| n14 n11 -->|pixels| n15 n14 -->|mask| n15 n5 -->|model| n16 n6 -->|positive| n16 n15 -->|latent_image| n16 n16 -->|samples| n17 n11 -->|destination| n18 n17 -->|source| n18 n14 -->|mask| n18 n18 -->|images| n19
Data-flow DAG — scroll to zoom, drag to pan.

Nodes (20)#

1UNETLoadercore
unet_name = {{checkpoint_map[checkpoint]}} tmplweight_dtype = default
outputs: MODEL
2CLIPLoadercore
clip_name = qwen_3_4b.safetensorstype = lumina2device = default
outputs: CLIP
3VAELoadercore
vae_name = ae.safetensors
outputs: VAE
4CheckpointLoaderSimplecore
ckpt_name = {{checkpoint_map[checkpoint]}} tmpl
outputs: MODELCLIPVAE
5LoraLoaderModelOnlycore
model = {{loader_refs[checkpoint_profile[checkpoint].loader].model}} tmpllora_name = {{lora_map[lora]}} tmplstrength_model = {{lora_strength}} tmpl
outputs: MODEL
6ModelSamplingAuraFlowcore
model = {{lora_ref if lora != 'none' else loader_refs[checkpoint_profile[checkpoint].loader].model}} tmplshift = 3
outputs: MODEL
7CLIPTextEncodecore
text = {{constructed_prompt}} tmplclip = {{loader_refs[checkpoint_profile[checkpoint].loader].clip}} tmpl
outputs: CONDITIONING
8CLIPTextEncodecore
text = {{negative_prompt}} tmplclip = {{loader_refs[checkpoint_profile[checkpoint].loader].clip}} tmpl
outputs: CONDITIONING
9ConditioningZeroOutcore
conditioning = ◂ node 7 · out[0]
outputs: CONDITIONING
10LoadImagecore
image = {{source_image}} tmpl
outputs: IMAGEMASK
11LoadImagecore
image = {{mask_image}} tmpl
outputs: IMAGEMASK
12ImageScaleToMaxDimensioncore
image = ◂ node 10 · out[0]upscale_method = lanczoslargest_size = 1024
outputs: IMAGE
13ImageScaleToMaxDimensioncore
image = ◂ node 11 · out[0]upscale_method = nearest-exactlargest_size = 1024
outputs: IMAGE
14ImageToMaskcore
image = ◂ node 13 · out[0]channel = red
outputs: MASK
15GrowMaskcore
mask = ◂ node 14 · out[0]expand = {{grow_mask_by}} tmpltapered_corners = true
outputs: MASK
16VAEEncodeForInpaintcore
pixels = ◂ node 12 · out[0]vae = {{loader_refs[checkpoint_profile[checkpoint].loader].vae}} tmplmask = ◂ node 15 · out[0]grow_mask_by = 6
outputs: LATENT
17KSamplercore
model = ◂ node 6 · out[0]positive = ◂ node 7 · out[0]negative = {{checkpoint_profile[checkpoint].negative}} tmpllatent_image = ◂ node 16 · out[0]seed = {{seed}} tmplsteps = {{distilled_schedule.steps if checkpoint_profile[checkpoint].distilled else steps}} tmplcfg = {{distilled_schedule.cfg if checkpoint_profile[checkpoint].distilled else cfg}} tmplsampler_name = res_multistepscheduler = simpledenoise = {{denoise}} tmpl
outputs: LATENT
18VAEDecodecore
samples = ◂ node 17 · out[0]vae = {{loader_refs[checkpoint_profile[checkpoint].loader].vae}} tmpl
outputs: IMAGE
19ImageCompositeMaskedcore
destination = ◂ node 12 · out[0]source = ◂ node 18 · out[0]x = 0y = 0resize_source = falsemask = ◂ node 15 · out[0]
outputs: IMAGE
20SaveImagecore
images = ◂ node 19 · out[0]filename_prefix = isis/zimage-inpaint

Prompt construction#

template
{base_prompt}

Variables (1)#

base_prompt
{{prompt}} tmpl

Parameter banks (8)#

The prompt / configuration lookup tables this workflow keys into from its inputs — the vocabulary that turns a style / palette / preset selection into graph parameters.

option_policy (2)#

checkpoint
{"zimage-base-bf16": {"distribution": "service", "content": "neutral"}, "cyberrealistic-zimage-turbo-v8-bf16": {"distribution": "service", "content": "racy"}, "zimage-turbo-bf16-aio": {"distribution": "service", "content": "neutral"}}
lora
{"photoreal-betternudes-v3": {"distribution": "service", "content": "explicit"}, "realistic-snapshot-v5": {"distribution": "service", "content": "neutral"}, "breast-slider": {"distribution": "service", "content": "racy"}, "detail-slider": {"distribution": "service", "content": "neutral"}, "detaildaemonz-v1.1": {"distribution": "service", "content": "neutral"}}

checkpoint_map (3)#

zimage-base-bf16
z_image_bf16.safetensors
cyberrealistic-zimage-turbo-v8-bf16
cyberrealistic_zimage_turbo_v8_bf16.safetensors
zimage-turbo-bf16-aio
zimage_turbo_bf16_aio.safetensors

checkpoint_profile (3)#

zimage-base-bf16
{"loader": "unet", "distilled": false, "negative": ["8", 0]}
cyberrealistic-zimage-turbo-v8-bf16
{"loader": "unet", "distilled": true, "negative": ["9", 0]}
zimage-turbo-bf16-aio
{"loader": "aio", "distilled": true, "negative": ["9", 0]}

distilled_schedule (2)#

steps
8
cfg
1.0

loader_refs (2)#

unet
{"model": ["1", 0], "clip": ["2", 0], "vae": ["3", 0]}
aio
{"model": ["4", 0], "clip": ["4", 1], "vae": ["4", 2]}

lora_ref (2)#

50

lora_map (6)#

none
photoreal-betternudes-v3
zimage-photoreal-betternudes-v3.safetensors
realistic-snapshot-v5
zimage-realistic-snapshot-v5.safetensors
breast-slider
zimage-breast-slider.safetensors
detail-slider
zimage-detail-slider.safetensors
detaildaemonz-v1.1
zimage-detaildaemonz-v1.1.safetensors

requires_families (3)#

zimagezimage-cyberrealisticzimage-aio

Models & dependencies#

Models required (10)#

z_image_bf16.safetensors
cyberrealistic_zimage_turbo_v8_bf16.safetensors
zimage_turbo_bf16_aio.safetensors
qwen_3_4b.safetensors
ae.safetensors
zimage-photoreal-betternudes-v3.safetensors
zimage-realistic-snapshot-v5.safetensors
zimage-breast-slider.safetensors
zimage-detail-slider.safetensors
zimage-detaildaemonz-v1.1.safetensors

Output contract#

What a successful run of this workflow returns.

type
image
format
png

Taxonomy & routing#

How the control plane classifies this workflow — from the committed workflow-taxonomy-registry.json. It drives the consistency / control surface the agentic director can exercise over the workflow.

assetFamily
portrait-hero-image-bundle
outputPackageProfile
image-single-profile
controlModalities
model-locksampler-scheduler-lockseed-lockcontrolnet-inpaintlatent-reuse
consistencyDimensions
identitylightingenvironment
notes
Z-Image inpaint with a user mask, untouched pixels composited back; a Turbo checkpoint selects the 8-step schedule.