{
  "workflow_info": {
    "name": "Z-Image Text-to-Image",
    "description": "Z-Image text-to-image on the RunPod image endpoint: the 6B base (CFG and negative prompt) or a Civitai Turbo finetune (CyberRealistic v8.0 bf16, Z-Image-Turbo BF16 AIO), with an optional Z-Image LoRA. Translated from Comfy-Org/workflow_templates@aaac56dd templates/image_z_image.json (base: KSampler res_multistep + simple, 25 steps, CFG 4, ModelSamplingAuraFlow shift 3, 1024x1024 from ResolutionSelector 1:1 at 1 MP, empty negative prompt) and templates/image_z_image_turbo.json (Turbo: 8 steps, CFG 1, negative zeroed with ConditioningZeroOut). Choosing a Turbo checkpoint selects the Turbo schedule through checkpoint_profile.",
    "version": "1.0.0",
    "author": "Oshun Platform",
    "category": "zimage",
    "tags": ["zimage", "runpod-serverless", "volume-backed", "text-to-image"],
    "estimated_time_seconds": 122,
    "gpu_requirement": "A5000"
  },
  "estimated_cost_usd": 0.0534,
  "cost_note": "MEASURED 2026-09-14 (A.05.02, RunPod job 9ba69352-2dfa-4f89-a14a-fcbf61503fd4-e1): 121.6 s of execution at 0.000439 USD/s = 0.0534 USD; base checkpoint at 1024x1024, 25 steps, first render of the family on the worker so it includes loading the weights; the Turbo AIO checkpoint's first render took 99.3 s (0.0436 USD) including its 20.5 GB load, and warm Turbo renders with a LoRA took 6.6 to 9.3 s (0.0029 to 0.0041 USD). Queue delay is not billed.",
  "content_policy": "adult_ok",
  "policy_note": "Z-Image base and the Qwen3 4B encoder are Apache-2.0 (Tongyi-MAI/Z-Image) with no acceptable-use clause (licence facts verified 2026-09-13), and the CyberRealistic and AIO checkpoints and the five Z-Image LoRAs are Civitai releases with all four permission flags (Image, RentCivit, Rent, Sell), so their flags limit neither distribution nor content; option_policy carries each option's content rating from the manifest licence string (A.04.01/A.04.02).",
  "proof_level": "rendered",
  "proof_note": "RENDERED on the live image endpoint 2026-09-14 (A.05.02, RunPod job 9ba69352-2dfa-4f89-a14a-fcbf61503fd4-e1, 57bcfbd0-4ba6-48fb-80ec-6d08485ff167-e2, a7b20555-2643-43c0-81b3-bc3d8dec05c0-e1, 486d9efc-26cf-4b9e-97bd-6394be3f928b-e2, 441c0e6f-6a98-429c-a922-66860acfd2f8-e1, 119d22c0-1cfd-464b-bae2-e868a41effae-e2, e4888677-b741-4245-9142-27e648773993-e2). Output sizes and sha256 are in docs/agents/isis-chroma-runpod-evidence.md section A.05.02; each output was checked beyond its status (dimensions, and the property the proof names).",
  "option_policy": {
    "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"
      }
    }
  },
  "inputs": {
    "prompt": {
      "type": "string",
      "required": true,
      "default": "Latina female with thick wavy hair, harbor boats and pastel houses behind. Breezy seaside light, warm tones, cinematic close-up.",
      "description": "Positive prompt in natural prose (the default is the prompt of the upstream Z-Image-Turbo template)",
      "max_length": 4000
    },
    "negative_prompt": {
      "type": "string",
      "default": "",
      "description": "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.",
      "max_length": 4000
    },
    "checkpoint": {
      "type": "enum",
      "options": [
        "zimage-base-bf16",
        "cyberrealistic-zimage-turbo-v8-bf16",
        "zimage-turbo-bf16-aio"
      ],
      "default": "zimage-base-bf16",
      "description": "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."
    },
    "steps": {
      "type": "integer",
      "default": 25,
      "min": 8,
      "max": 60,
      "description": "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."
    },
    "cfg": {
      "type": "float",
      "default": 4.0,
      "min": 1.0,
      "max": 10.0,
      "description": "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."
    },
    "seed": {
      "type": "integer",
      "default": -1,
      "description": "Random seed (-1 = random)"
    },
    "aspect": {
      "type": "enum",
      "options": [
        "square_1024x1024",
        "portrait_2x3_840x1256",
        "landscape_3x2_1256x840",
        "portrait_3x4_888x1184",
        "landscape_4x3_1184x888",
        "portrait_9x16_768x1368",
        "landscape_16x9_1368x768",
        "ultrawide_21x9_1568x672"
      ],
      "default": "square_1024x1024",
      "description": "Output aspect. The sizes are what the upstream template's ResolutionSelector (1.0 MP, multiple of 8) computes for each of its eight ratios (ComfyUI v0.34.0 comfy_extras/nodes_resolution.py: scale = sqrt(1024^2 / (w*h)), each side rounded to a multiple of 8); they are literals here so the per-job caps can read the latent size."
    },
    "batch_size": {
      "type": "integer",
      "default": 1,
      "min": 1,
      "max": 1,
      "description": "Images per run. Pinned to 1: the executor's resolution-scaled batch cap (C.12.19) allows a second latent only below ~0.5 MP, and every aspect here is ~1 MP."
    },
    "lora": {
      "type": "enum",
      "options": [
        "none",
        "photoreal-betternudes-v3",
        "realistic-snapshot-v5",
        "breast-slider",
        "detail-slider",
        "detaildaemonz-v1.1"
      ],
      "default": "none",
      "description": "Optional Z-Image LoRA (A.03.02, all Civitai with every commercial flag; none of the five versions lists trained words, so no trigger is appended). photoreal-betternudes-v3 = PhotoReal BetterNudes v3 (explicit); realistic-snapshot-v5 = Realistic Snapshot ZIT v5; breast-slider and detail-slider = [ZIT] sliders, driven by strength in either direction; detaildaemonz-v1.1 = DetailDeamonZ v1.1 slider. All but DetailDeamonZ were trained on Z-Image Turbo (DetailDeamonZ lists Z-Image base and serves both); on the base checkpoint the Turbo-trained ones load onto the same architecture but were not trained for it. none leaves the graph without a LoRA loader."
    },
    "lora_strength": {
      "type": "float",
      "default": 1.0,
      "min": -2.0,
      "max": 2.0,
      "description": "LoRA strength on the model (LoraLoaderModelOnly.strength_model). The sliders are meant to be driven negative as well as positive."
    }
  },
  "checkpoint_map": {
    "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": {
    "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": {
    "steps": 8,
    "cfg": 1.0
  },
  "loader_refs": {
    "unet": {
      "model": ["1", 0],
      "clip": ["2", 0],
      "vae": ["3", 0]
    },
    "aio": {
      "model": ["4", 0],
      "clip": ["4", 1],
      "vae": ["4", 2]
    }
  },
  "lora_ref": ["5", 0],
  "lora_map": {
    "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"
  },
  "aspect_map": {
    "square_1024x1024": {
      "width": 1024,
      "height": 1024
    },
    "portrait_2x3_840x1256": {
      "width": 840,
      "height": 1256
    },
    "landscape_3x2_1256x840": {
      "width": 1256,
      "height": 840
    },
    "portrait_3x4_888x1184": {
      "width": 888,
      "height": 1184
    },
    "landscape_4x3_1184x888": {
      "width": 1184,
      "height": 888
    },
    "portrait_9x16_768x1368": {
      "width": 768,
      "height": 1368
    },
    "landscape_16x9_1368x768": {
      "width": 1368,
      "height": 768
    },
    "ultrawide_21x9_1568x672": {
      "width": 1568,
      "height": 672
    }
  },
  "prompt_construction": {
    "template": "{base_prompt}",
    "variables": {
      "base_prompt": "{{prompt}}"
    }
  },
  "nodes": {
    "1": {
      "class_type": "UNETLoader",
      "inputs": {
        "unet_name": "{{checkpoint_map[checkpoint]}}",
        "weight_dtype": "default"
      },
      "outputs": ["MODEL"],
      "_condition": "{{checkpoint_profile[checkpoint].loader == 'unet'}}",
      "_comment": "Base and CyberRealistic load as a bare transformer (both upstream templates: UNETLoader, weight_dtype default). Absent for the AIO checkpoint, whose loader is node 4."
    },
    "2": {
      "class_type": "CLIPLoader",
      "inputs": {
        "clip_name": "qwen_3_4b.safetensors",
        "type": "lumina2",
        "device": "default"
      },
      "outputs": ["CLIP"],
      "_condition": "{{checkpoint_profile[checkpoint].loader == 'unet'}}",
      "_comment": "Qwen3 4B in lumina2 mode, as both upstream Z-Image templates load it."
    },
    "3": {
      "class_type": "VAELoader",
      "inputs": {
        "vae_name": "ae.safetensors"
      },
      "outputs": ["VAE"],
      "_condition": "{{checkpoint_profile[checkpoint].loader == 'unet'}}"
    },
    "4": {
      "class_type": "CheckpointLoaderSimple",
      "inputs": {
        "ckpt_name": "{{checkpoint_map[checkpoint]}}"
      },
      "outputs": ["MODEL", "CLIP", "VAE"],
      "_condition": "{{checkpoint_profile[checkpoint].loader == 'aio'}}",
      "_comment": "A.03.02: the Z-Image-Turbo BF16 AIO file carries its transformer, encoder and VAE, so it loads with CheckpointLoaderSimple and nodes 1-3 are dropped. Every consumer picks its MODEL/CLIP/VAE link from loader_refs, so no bypass rewiring is involved."
    },
    "5": {
      "class_type": "LoraLoaderModelOnly",
      "inputs": {
        "model": "{{loader_refs[checkpoint_profile[checkpoint].loader].model}}",
        "lora_name": "{{lora_map[lora]}}",
        "strength_model": "{{lora_strength}}"
      },
      "outputs": ["MODEL"],
      "_condition": "{{lora != 'none'}}",
      "_comment": "C.12.01 pattern: present only when a LoRA is chosen, between the loader and ModelSamplingAuraFlow. Node 6 reads it through lora_ref rather than a _condition_passthrough, because a bypass resolves the dropped node's unrendered inputs and this node's model input is an expression."
    },
    "6": {
      "class_type": "ModelSamplingAuraFlow",
      "inputs": {
        "model": "{{lora_ref if lora != 'none' else loader_refs[checkpoint_profile[checkpoint].loader].model}}",
        "shift": 3
      },
      "outputs": ["MODEL"],
      "_comment": "Shift 3, the value in both upstream Z-Image templates."
    },
    "7": {
      "class_type": "CLIPTextEncode",
      "inputs": {
        "text": "{{constructed_prompt}}",
        "clip": "{{loader_refs[checkpoint_profile[checkpoint].loader].clip}}"
      },
      "outputs": ["CONDITIONING"]
    },
    "8": {
      "class_type": "CLIPTextEncode",
      "inputs": {
        "text": "{{negative_prompt}}",
        "clip": "{{loader_refs[checkpoint_profile[checkpoint].loader].clip}}"
      },
      "outputs": ["CONDITIONING"],
      "_condition": "{{not checkpoint_profile[checkpoint].distilled}}",
      "_comment": "Base checkpoint only (upstream base template: a negative CLIPTextEncode)."
    },
    "9": {
      "class_type": "ConditioningZeroOut",
      "inputs": {
        "conditioning": ["7", 0]
      },
      "outputs": ["CONDITIONING"],
      "_condition": "{{checkpoint_profile[checkpoint].distilled}}",
      "_comment": "Turbo checkpoints only (upstream Turbo template: the negative is the positive zeroed)."
    },
    "10": {
      "class_type": "EmptySD3LatentImage",
      "inputs": {
        "width": "{{aspect_map[aspect].width}}",
        "height": "{{aspect_map[aspect].height}}",
        "batch_size": "{{batch_size}}"
      },
      "outputs": ["LATENT"]
    },
    "11": {
      "class_type": "KSampler",
      "inputs": {
        "model": ["6", 0],
        "positive": ["7", 0],
        "negative": "{{checkpoint_profile[checkpoint].negative}}",
        "latent_image": ["10", 0],
        "seed": "{{seed}}",
        "steps": "{{distilled_schedule.steps if checkpoint_profile[checkpoint].distilled else steps}}",
        "cfg": "{{distilled_schedule.cfg if checkpoint_profile[checkpoint].distilled else cfg}}",
        "sampler_name": "res_multistep",
        "scheduler": "simple",
        "denoise": 1.0
      },
      "outputs": ["LATENT"],
      "_comment": "res_multistep + simple at denoise 1 in both upstream templates; steps and CFG come from the inputs on the base and from distilled_schedule (8, 1) on a Turbo checkpoint."
    },
    "12": {
      "class_type": "VAEDecode",
      "inputs": {
        "samples": ["11", 0],
        "vae": "{{loader_refs[checkpoint_profile[checkpoint].loader].vae}}"
      },
      "outputs": ["IMAGE"]
    },
    "13": {
      "class_type": "SaveImage",
      "inputs": {
        "images": ["12", 0],
        "filename_prefix": "isis/zimage-txt2img"
      },
      "outputs": [],
      "_comment": "SaveImage rather than the base template's SaveImageAdvanced (png, 8-bit, sRGB), which writes the same PNG; the worker returns SaveImage outputs, as every other image workflow here."
    }
  },
  "output_spec": {
    "type": "image",
    "format": "png"
  },
  "models_required": [
    "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"
  ],
  "requires_families": ["zimage", "zimage-cyberrealistic", "zimage-aio"],
  "custom_nodes_required": [],
  "cost_calibration": "measured",
  "cost_calibration_note": "MEASURED 2026-09-14 (A.05.02, RunPod job 9ba69352-2dfa-4f89-a14a-fcbf61503fd4-e1): 121.6 s of execution at 0.000439 USD/s = 0.0534 USD; base checkpoint at 1024x1024, 25 steps, first render of the family on the worker so it includes loading the weights; the Turbo AIO checkpoint's first render took 99.3 s (0.0436 USD) including its 20.5 GB load, and warm Turbo renders with a LoRA took 6.6 to 9.3 s (0.0029 to 0.0041 USD). Queue delay is not billed."
}
