{
 "id": "989d19a0-ffb0-47bb-b76f-16e2942aa060",
 "revision": 0,
 "last_node_id": 21,
 "last_link_id": 14,
 "nodes": [
  {
   "id": 3,
   "type": "UNETLoader",
   "pos": [
    0,
    300
   ],
   "size": [
    330,
    82
   ],
   "flags": {},
   "order": 0,
   "mode": 0,
   "inputs": [
    {
     "localized_name": "unet_name",
     "name": "unet_name",
     "type": "COMBO",
     "widget": {
      "name": "unet_name"
     },
     "link": null
    },
    {
     "localized_name": "weight_dtype",
     "name": "weight_dtype",
     "type": "COMBO",
     "widget": {
      "name": "weight_dtype"
     },
     "link": null
    }
   ],
   "outputs": [
    {
     "localized_name": "MODEL",
     "name": "MODEL",
     "type": "MODEL",
     "links": [
      1
     ]
    }
   ],
   "properties": {
    "cnr_id": "comfy-core",
    "ver": "0.42.1",
    "Node name for S&R": "UNETLoader"
   },
   "widgets_values": [
    "z-image\\z_image_turbo_int8_convrot.safetensors",
    "default"
   ],
   "widgets_values_named": {
    "unet_name": "z-image\\z_image_turbo_int8_convrot.safetensors",
    "weight_dtype": "default"
   },
   "color": "#223",
   "bgcolor": "#335"
  },
  {
   "id": 4,
   "type": "CLIPLoader",
   "pos": [
    0,
    420
   ],
   "size": [
    330,
    106
   ],
   "flags": {},
   "order": 1,
   "mode": 0,
   "inputs": [
    {
     "localized_name": "clip_name",
     "name": "clip_name",
     "type": "COMBO",
     "widget": {
      "name": "clip_name"
     },
     "link": null
    },
    {
     "localized_name": "type",
     "name": "type",
     "type": "COMBO",
     "widget": {
      "name": "type"
     },
     "link": null
    },
    {
     "localized_name": "device",
     "name": "device",
     "shape": 7,
     "type": "COMBO",
     "widget": {
      "name": "device"
     },
     "link": null
    }
   ],
   "outputs": [
    {
     "localized_name": "CLIP",
     "name": "CLIP",
     "type": "CLIP",
     "links": [
      2,
      10
     ]
    }
   ],
   "properties": {
    "cnr_id": "comfy-core",
    "ver": "0.42.1",
    "Node name for S&R": "CLIPLoader"
   },
   "widgets_values": [
    "qwen_3_4b_fp8_mixed.safetensors",
    "lumina2",
    "default"
   ],
   "widgets_values_named": {
    "clip_name": "qwen_3_4b_fp8_mixed.safetensors",
    "type": "lumina2",
    "device": "default"
   },
   "color": "#223",
   "bgcolor": "#335"
  },
  {
   "id": 5,
   "type": "VAELoader",
   "pos": [
    0,
    570
   ],
   "size": [
    330,
    58
   ],
   "flags": {},
   "order": 2,
   "mode": 0,
   "inputs": [
    {
     "localized_name": "vae_name",
     "name": "vae_name",
     "type": "COMBO",
     "widget": {
      "name": "vae_name"
     },
     "link": null
    }
   ],
   "outputs": [
    {
     "localized_name": "VAE",
     "name": "VAE",
     "type": "VAE",
     "links": [
      9,
      14
     ]
    }
   ],
   "properties": {
    "cnr_id": "comfy-core",
    "ver": "0.42.1",
    "Node name for S&R": "VAELoader"
   },
   "widgets_values": [
    "ae.safetensors"
   ],
   "widgets_values_named": {
    "vae_name": "ae.safetensors"
   },
   "color": "#223",
   "bgcolor": "#335"
  },
  {
   "id": 6,
   "type": "CLIPTextEncode",
   "pos": [
    380,
    250
   ],
   "size": [
    520,
    330
   ],
   "flags": {},
   "order": 3,
   "mode": 0,
   "inputs": [
    {
     "localized_name": "clip",
     "name": "clip",
     "type": "CLIP",
     "link": 2
    },
    {
     "localized_name": "text",
     "name": "text",
     "type": "STRING",
     "widget": {
      "name": "text"
     },
     "link": null
    }
   ],
   "outputs": [
    {
     "localized_name": "CONDITIONING",
     "name": "CONDITIONING",
     "type": "CONDITIONING",
     "links": [
      3
     ]
    }
   ],
   "properties": {
    "cnr_id": "comfy-core",
    "ver": "0.42.1",
    "Node name for S&R": "CLIPTextEncode"
   },
   "widgets_values": [
    "A stylized 3D animated film still of a cute grey tabby cat with big shiny green eyes, sitting and looking at the camera. Soft rounded shapes, fur made of fine soft strands, a plain light grey studio background, soft light."
   ],
   "widgets_values_named": {
    "text": "A stylized 3D animated film still of a cute chubby panda painter in a cozy artist's studio. Its fur pattern is a giant panda's, but in orange and white: bright orange round ears, orange patches around its eyes, orange arms and legs, an orange band across its shoulders, and soft white fur everywhere else. It stands on its hind legs at a wooden easel, wearing a navy beret and a cream apron with a few paint stains. Its right paw holds a thin paintbrush touching the canvas, its left paw rests relaxed at its side. Beside the easel, a small wooden stool holds three open paint pots, orange, blue and yellow. Big shiny dark eyes, soft rounded shapes, fur made of fine soft strands. Warm afternoon sunlight comes from a tall window on camera-left, a beam of light with floating dust, shelves of paint jars behind. Medium shot at the panda's eye level, 50mm, the background softly blurred. A palette of warm orange, navy and cream."
   },
   "color": "#232",
   "bgcolor": "#353"
  },
  {
   "id": 9,
   "type": "KSampler",
   "pos": [
    950,
    250
   ],
   "size": [
    300,
    262
   ],
   "flags": {},
   "order": 4,
   "mode": 0,
   "inputs": [
    {
     "localized_name": "model",
     "name": "model",
     "type": "MODEL",
     "link": 1
    },
    {
     "localized_name": "positive",
     "name": "positive",
     "type": "CONDITIONING",
     "link": 3
    },
    {
     "localized_name": "negative",
     "name": "negative",
     "type": "CONDITIONING",
     "link": 11
    },
    {
     "localized_name": "latent_image",
     "name": "latent_image",
     "type": "LATENT",
     "link": 13
    },
    {
     "localized_name": "seed",
     "name": "seed",
     "type": "INT",
     "widget": {
      "name": "seed"
     },
     "link": null
    },
    {
     "localized_name": "steps",
     "name": "steps",
     "type": "INT",
     "widget": {
      "name": "steps"
     },
     "link": null
    },
    {
     "localized_name": "cfg",
     "name": "cfg",
     "type": "FLOAT",
     "widget": {
      "name": "cfg"
     },
     "link": null
    },
    {
     "localized_name": "sampler_name",
     "name": "sampler_name",
     "type": "COMBO",
     "widget": {
      "name": "sampler_name"
     },
     "link": null
    },
    {
     "localized_name": "scheduler",
     "name": "scheduler",
     "type": "COMBO",
     "widget": {
      "name": "scheduler"
     },
     "link": null
    },
    {
     "localized_name": "denoise",
     "name": "denoise",
     "type": "FLOAT",
     "widget": {
      "name": "denoise"
     },
     "link": null
    }
   ],
   "outputs": [
    {
     "localized_name": "LATENT",
     "name": "LATENT",
     "type": "LATENT",
     "links": [
      7
     ]
    }
   ],
   "properties": {
    "cnr_id": "comfy-core",
    "ver": "0.42.1",
    "Node name for S&R": "KSampler"
   },
   "widgets_values": [
    2026,
    "fixed",
    8,
    1,
    "res_multistep",
    "simple",
    0.7
   ],
   "widgets_values_named": {
    "seed": 2026,
    "control_after_generate": "fixed",
    "steps": 8,
    "cfg": 1,
    "sampler_name": "res_multistep",
    "scheduler": "simple",
    "denoise": 1
   }
  },
  {
   "id": 10,
   "type": "VAEDecode",
   "pos": [
    1290,
    250
   ],
   "size": [
    210,
    46
   ],
   "flags": {},
   "order": 5,
   "mode": 0,
   "inputs": [
    {
     "localized_name": "samples",
     "name": "samples",
     "type": "LATENT",
     "link": 7
    },
    {
     "localized_name": "vae",
     "name": "vae",
     "type": "VAE",
     "link": 9
    }
   ],
   "outputs": [
    {
     "localized_name": "IMAGE",
     "name": "IMAGE",
     "type": "IMAGE",
     "links": [
      8
     ]
    }
   ],
   "properties": {
    "cnr_id": "comfy-core",
    "ver": "0.42.1",
    "Node name for S&R": "VAEDecode"
   }
  },
  {
   "id": 11,
   "type": "SaveImage",
   "pos": [
    1290,
    340
   ],
   "size": [
    380,
    440
   ],
   "flags": {},
   "order": 6,
   "mode": 0,
   "inputs": [
    {
     "localized_name": "images",
     "name": "images",
     "type": "IMAGE",
     "link": 8
    },
    {
     "localized_name": "filename_prefix",
     "name": "filename_prefix",
     "type": "STRING",
     "widget": {
      "name": "filename_prefix"
     },
     "link": null
    }
   ],
   "outputs": [
    {
     "localized_name": "images",
     "name": "images",
     "type": "IMAGE",
     "links": null
    }
   ],
   "properties": {
    "cnr_id": "comfy-core",
    "ver": "0.42.1",
    "Node name for S&R": "SaveImage"
   },
   "widgets_values": [
    "Nodes Explained/VAE"
   ],
   "widgets_values_named": {
    "filename_prefix": "Nodes Explained/Image Size"
   }
  },
  {
   "id": 12,
   "type": "CLIPTextEncode",
   "pos": [
    380,
    640
   ],
   "size": [
    520,
    140
   ],
   "flags": {},
   "order": 7,
   "mode": 0,
   "inputs": [
    {
     "localized_name": "clip",
     "name": "clip",
     "type": "CLIP",
     "link": 10
    },
    {
     "localized_name": "text",
     "name": "text",
     "type": "STRING",
     "widget": {
      "name": "text"
     },
     "link": null
    }
   ],
   "outputs": [
    {
     "localized_name": "CONDITIONING",
     "name": "CONDITIONING",
     "type": "CONDITIONING",
     "links": [
      11
     ]
    }
   ],
   "properties": {
    "cnr_id": "comfy-core",
    "ver": "0.42.3",
    "Node name for S&R": "CLIPTextEncode"
   },
   "widgets_values": [
    "blurry, ugly, bad hands, low quality"
   ],
   "widgets_values_named": {
    "text": "blurry, ugly, bad hands, low quality"
   },
   "color": "#322",
   "bgcolor": "#533"
  },
  {
   "id": 20,
   "type": "LoadImage",
   "pos": [
    0,
    690
   ],
   "size": [
    330,
    360
   ],
   "flags": {},
   "order": 8,
   "mode": 0,
   "inputs": [
    {
     "name": "image",
     "type": "COMBO",
     "link": null,
     "widget": {
      "name": "image"
     }
    },
    {
     "name": "upload",
     "type": "IMAGEUPLOAD",
     "link": null,
     "widget": {
      "name": "upload"
     }
    }
   ],
   "outputs": [
    {
     "name": "IMAGE",
     "type": "IMAGE",
     "links": [
      12
     ],
     "slot_index": 0
    },
    {
     "name": "MASK",
     "type": "MASK",
     "links": [],
     "slot_index": 1
    }
   ],
   "properties": {
    "Node name for S&R": "LoadImage"
   },
   "widgets_values": [
    "Cat.jpeg",
    "image"
   ]
  },
  {
   "id": 21,
   "type": "VAEEncode",
   "pos": [
    700,
    830
   ],
   "size": [
    210,
    46
   ],
   "flags": {},
   "order": 9,
   "mode": 0,
   "inputs": [
    {
     "name": "pixels",
     "type": "IMAGE",
     "link": 12
    },
    {
     "name": "vae",
     "type": "VAE",
     "link": 14
    }
   ],
   "outputs": [
    {
     "name": "LATENT",
     "type": "LATENT",
     "links": [
      13
     ],
     "slot_index": 0
    }
   ],
   "properties": {
    "Node name for S&R": "VAEEncode"
   },
   "widgets_values": null
  },
  {
   "id": 1,
   "type": "MarkdownNote",
   "pos": [
    -470,
    -10
   ],
   "size": [
    430,
    338
   ],
   "flags": {},
   "order": 10,
   "mode": 0,
   "inputs": [],
   "outputs": [],
   "properties": {},
   "widgets_values": [
    "## ComfyUI Nodes Explained: the VAE\n\n**Finished workflow** = the answer to the Practice tasks: **image to image** with **Z-Image Turbo**. **Load Image** gives the photo, **VAE Encode** packs it into a latent, the **KSampler** changes it (denoise **0.7**), and **VAE Decode** unpacks the result. **One Load VAE** feeds both VAE nodes. Press **Run**.\n\nThe video and the Practice workflow:\nhttps://workflows.pixaroma.com/comfyui-nodes-explained/6/\n\n**The 3 model files (Z-Image Turbo, free, the same files as in Videos 1 to 5):**\n\n- [z_image_turbo_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/diffusion_models/z_image_turbo_int8_convrot.safetensors) (6.2 GB)\n  goes in **ComfyUI/models/diffusion_models/z-image**\n- [qwen_3_4b_fp8_mixed.safetensors](https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/text_encoders/qwen_3_4b_fp8_mixed.safetensors) (5.6 GB)\n  goes in **ComfyUI/models/text_encoders**\n- [ae.safetensors](https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/vae/ae.safetensors) (0.3 GB)\n  goes in **ComfyUI/models/vae**\n\nAfter you add files while ComfyUI is open, click an empty spot on the canvas and press **R**, so the lists refresh."
   ],
   "color": "#432",
   "bgcolor": "#653"
  },
  {
   "id": 2,
   "type": "MarkdownNote",
   "pos": [
    -470,
    398
   ],
   "size": [
    430,
    268
   ],
   "flags": {},
   "order": 11,
   "mode": 0,
   "inputs": [],
   "outputs": [],
   "properties": {},
   "widgets_values": [
    "### How the VAE works\n\nThe **KSampler** does not make an image. It makes a **latent**, a small packed version, and **VAE Decode** unpacks it into the image.\n\n**VAE Encode** does the opposite: it packs a photo into a latent, so you can start from your own photo. **denoise** decides how much of the photo is kept.\n\n**One VAE per model family.** Z-Image uses **ae.safetensors**, Flux 2 Klein uses a **Flux 2 VAE**. The wrong one on VAE Decode stops VAE Decode. The wrong one on VAE Encode shows its error on the **KSampler**, so use **one Load VAE** for both.\n\n**Every trip loses a little:** pass the latent from sampler to sampler, and decode only at the end.\n\n**VAE Decode (Tiled)** unpacks a very big image in pieces when the normal node fills your card's memory. At normal sizes it is slower."
   ],
   "color": "#232",
   "bgcolor": "#353",
   "title": "What you learned"
  }
 ],
 "links": [
  [
   1,
   3,
   0,
   9,
   0,
   "MODEL"
  ],
  [
   2,
   4,
   0,
   6,
   0,
   "CLIP"
  ],
  [
   3,
   6,
   0,
   9,
   1,
   "CONDITIONING"
  ],
  [
   7,
   9,
   0,
   10,
   0,
   "LATENT"
  ],
  [
   8,
   10,
   0,
   11,
   0,
   "IMAGE"
  ],
  [
   9,
   5,
   0,
   10,
   1,
   "VAE"
  ],
  [
   10,
   4,
   0,
   12,
   0,
   "CLIP"
  ],
  [
   11,
   12,
   0,
   9,
   2,
   "CONDITIONING"
  ],
  [
   12,
   20,
   0,
   21,
   0,
   "IMAGE"
  ],
  [
   13,
   21,
   0,
   9,
   3,
   "LATENT"
  ],
  [
   14,
   5,
   0,
   21,
   1,
   "VAE"
  ]
 ],
 "groups": [],
 "config": {},
 "extra": {
  "ds": {
   "scale": 0.55,
   "offset": [
    600,
    220
   ]
  }
 },
 "version": 0.4
}