{ "id": "b5c8e2f4-1a7d-4b39-8e62-9f0d3a6c1e84", "revision": 0, "last_node_id": 63, "last_link_id": 65, "nodes": [ { "id": 35, "type": "MarkdownNote", "pos": [ -680, 200 ], "size": [ 760, 1080 ], "flags": {}, "order": 0, "mode": 0, "inputs": [], "outputs": [], "title": "Read me", "properties": {}, "widgets_values": [ "# NitroFusion2 ControlNet\n\n## Model files\n\n**text_encoders**\n- [qwen_3_4b.safetensors](https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/text_encoders/qwen_3_4b.safetensors) (7.49 GB)\n\n**diffusion_models**\n- [nf2-bf16.safetensors](https://huggingface.co/ChenDY/NitroFusion2/resolve/main/nf2-bf16.safetensors) (12.3 GB)\n\n**model_patches**\n- [NitroFusion2-Controlnet-Union.safetensors](https://huggingface.co/ChenDY/NitroFusion2-Controlnet-Union/resolve/main/NitroFusion2-Controlnet-Union.safetensors) (6.7 GB)\n- [NitroFusion2-Controlnet-Union-lite.safetensors](https://huggingface.co/ChenDY/NitroFusion2-Controlnet-Union/resolve/main/NitroFusion2-Controlnet-Union-lite.safetensors) (2.0 GB, optional)\n\n**vae**\n- [ae.safetensors](https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/vae/ae.safetensors) (319.8 MB)\n\n## Folder structure\n\n```\nšŸ“‚ ComfyUI/\nā”œā”€ā”€ šŸ“‚ input/\n│ ā”œā”€ā”€ pose_inpaint_source.png\n│ ā”œā”€ā”€ pose_inpaint_mask.png\n│ └── pose_inpaint_pose.jpg\n└── šŸ“‚ models/\n ā”œā”€ā”€ šŸ“‚ text_encoders/\n │ └── qwen_3_4b.safetensors\n ā”œā”€ā”€ šŸ“‚ diffusion_models/\n │ └── nf2-bf16.safetensors\n ā”œā”€ā”€ šŸ“‚ model_patches/\n │ ā”œā”€ā”€ NitroFusion2-Controlnet-Union.safetensors\n │ └── NitroFusion2-Controlnet-Union-lite.safetensors\n └── šŸ“‚ vae/\n └── ae.safetensors\n```\n\n## How to use\n\n1. Load your control map (canny, HED, depth, pose, scribble or gray) in **Load Image (pose map)**. The example map is [asset/pose.jpg](https://huggingface.co/ChenDY/NitroFusion2-Controlnet-Union/resolve/main/asset/pose.jpg).\n2. Set **width** and **height** to the control map's aspect ratio (about 1 megapixel, multiples of 16).\n3. **control strength**: 1.0 is recommended.\n4. **controlnet**: NitroFusion2-Controlnet-Union.safetensors, or the lite file for lower memory with weaker control.\n\n## Inpainting\n\n- **Load Image (source to inpaint)**: the image to edit (pose_inpaint_source.png).\n- **Load Mask (white = repaint)**: white marks the area to repaint, black is kept; the red channel is read (pose_inpaint_mask.png).\n- **Load Image (pose map)**: the pose control for the repainted area (pose_inpaint_pose.jpg).\n- Set width and height to the source image's aspect ratio. Download all three from the asset/ folder of this repo and put them in ComfyUI/input/.\n\n**Without inpainting** (plain ControlNet, any condition): select **Load Image (source to inpaint)** and **Load Mask (white = repaint)** and bypass them (Ctrl+B), then load your control map in **Load Image (pose map)**.\n\n## Steps\n\nOne step (euler, simple). Keep cfg = 1.\n\n## Report workflow issue\n\nIf you found any issues when running this workflow, [report them here](https://huggingface.co/ChenDY/NitroFusion2-Controlnet-Union/discussions).\n" ], "color": "#222", "bgcolor": "#000" }, { "id": 57, "type": "4e7a2c19-8d3b-4f51-a6e0-3c9b1d7f0a33", "pos": [ 130, 200 ], "size": [ 400, 560 ], "flags": {}, "order": 1, "mode": 0, "inputs": [ { "label": "prompt", "name": "text", "type": "STRING", "widget": { "name": "text" }, "link": null }, { "label": "control image", "name": "image", "type": "IMAGE", "link": 63 }, { "label": "inpaint image", "name": "inpaint_image", "type": "IMAGE", "link": 64 }, { "label": "inpaint mask", "name": "mask", "type": "MASK", "link": 65 } ], "outputs": [ { "name": "IMAGE", "type": "IMAGE", "links": [ 62 ] } ], "properties": { "proxyWidgets": [ [ "6", "text" ], [ "9", "width" ], [ "9", "height" ], [ "10", "seed" ], [ "10", "steps" ], [ "1", "unet_name" ], [ "5", "clip_name" ], [ "8", "vae_name" ], [ "20", "name" ], [ "21", "strength" ], [ "10", "control_after_generate" ] ], "cnr_id": "comfy-core" }, "widgets_values": [] }, { "id": 60, "type": "SaveImage", "pos": [ 570, 200 ], "size": [ 780, 660 ], "flags": {}, "order": 2, "mode": 0, "inputs": [ { "name": "images", "type": "IMAGE", "link": 62 } ], "outputs": [], "properties": { "Node name for S&R": "SaveImage", "cnr_id": "comfy-core" }, "widgets_values": [ "NitroFusion2" ] }, { "id": 61, "type": "LoadImage", "pos": [ 130, 800 ], "size": [ 380, 420 ], "flags": {}, "order": 0, "mode": 0, "inputs": [], "outputs": [ { "localized_name": "IMAGE", "name": "IMAGE", "type": "IMAGE", "links": [ 63 ] }, { "localized_name": "MASK", "name": "MASK", "type": "MASK", "links": null } ], "properties": { "Node name for S&R": "LoadImage", "cnr_id": "comfy-core" }, "widgets_values": [ "pose_inpaint_pose.jpg", "image" ], "title": "Load Image (pose map)" }, { "id": 62, "type": "LoadImage", "pos": [ 130, 1260 ], "size": [ 380, 420 ], "flags": {}, "order": 0, "mode": 0, "inputs": [], "outputs": [ { "localized_name": "IMAGE", "name": "IMAGE", "type": "IMAGE", "links": [ 64 ] }, { "localized_name": "MASK", "name": "MASK", "type": "MASK", "links": null } ], "properties": { "Node name for S&R": "LoadImage", "cnr_id": "comfy-core" }, "widgets_values": [ "pose_inpaint_source.png", "image" ], "title": "Load Image (source to inpaint)" }, { "id": 63, "type": "LoadImageMask", "pos": [ 130, 1720 ], "size": [ 380, 440 ], "flags": {}, "order": 0, "mode": 0, "inputs": [ { "localized_name": "image", "name": "image", "type": "COMBO", "widget": { "name": "image" }, "link": null } ], "outputs": [ { "localized_name": "MASK", "name": "MASK", "type": "MASK", "links": [ 65 ] } ], "properties": { "Node name for S&R": "LoadImageMask", "cnr_id": "comfy-core" }, "widgets_values": [ "pose_inpaint_mask.png", "red", "image" ], "title": "Load Mask (white = repaint)" } ], "links": [ [ 62, 57, 0, 60, 0, "IMAGE" ], [ 63, 61, 0, 57, 1, "IMAGE" ], [ 64, 62, 0, 57, 2, "IMAGE" ], [ 65, 63, 0, 57, 3, "MASK" ] ], "groups": [], "definitions": { "subgraphs": [ { "id": "4e7a2c19-8d3b-4f51-a6e0-3c9b1d7f0a33", "version": 1, "state": { "lastGroupId": 3, "lastNodeId": 40, "lastLinkId": 126, "lastRerouteId": 0 }, "revision": 0, "config": {}, "name": "Control to Image (NitroFusion2 ControlNet, 1 step)", "inputNode": { "id": -10, "bounding": [ -560, 480, 120, 320 ] }, "outputNode": { "id": -20, "bounding": [ 1625, 320, 120, 60 ] }, "inputs": [ { "id": "4e7a2c19-8d3b-4f51-a6e0-3c9b1d7f0000", "name": "text", "type": "STRING", "linkIds": [ 110 ], "pos": [ -460, 500 ], "label": "prompt" }, { "id": "4e7a2c19-8d3b-4f51-a6e0-3c9b1d7f0001", "name": "width", "type": "INT", "linkIds": [ 111 ], "pos": [ -460, 520 ] }, { "id": "4e7a2c19-8d3b-4f51-a6e0-3c9b1d7f0002", "name": "height", "type": "INT", "linkIds": [ 112 ], "pos": [ -460, 540 ] }, { "id": "4e7a2c19-8d3b-4f51-a6e0-3c9b1d7f0003", "name": "seed", "type": "INT", "linkIds": [ 113 ], "pos": [ -460, 560 ] }, { "id": "4e7a2c19-8d3b-4f51-a6e0-3c9b1d7f0004", "name": "steps", "type": "INT", "linkIds": [ 114 ], "pos": [ -460, 580 ] }, { "id": "4e7a2c19-8d3b-4f51-a6e0-3c9b1d7f0005", "name": "unet_name", "type": "COMBO", "linkIds": [ 115 ], "pos": [ -460, 600 ] }, { "id": "4e7a2c19-8d3b-4f51-a6e0-3c9b1d7f0006", "name": "clip_name", "type": "COMBO", "linkIds": [ 116 ], "pos": [ -460, 620 ] }, { "id": "4e7a2c19-8d3b-4f51-a6e0-3c9b1d7f0007", "name": "vae_name", "type": "COMBO", "linkIds": [ 117 ], "pos": [ -460, 640 ] }, { "id": "4e7a2c19-8d3b-4f51-a6e0-3c9b1d7f0008", "name": "image", "type": "IMAGE", "linkIds": [ 122 ], "pos": [ -460, 660 ], "label": "control image" }, { "id": "4e7a2c19-8d3b-4f51-a6e0-3c9b1d7f0009", "name": "name", "type": "COMBO", "linkIds": [ 123 ], "pos": [ -460, 680 ], "label": "controlnet" }, { "id": "4e7a2c19-8d3b-4f51-a6e0-3c9b1d7f0010", "name": "strength", "type": "FLOAT", "linkIds": [ 124 ], "pos": [ -460, 700 ], "label": "control strength" }, { "id": "4e7a2c19-8d3b-4f51-a6e0-3c9b1d7f0011", "name": "inpaint_image", "type": "IMAGE", "linkIds": [ 125 ], "pos": [ -460, 720 ], "label": "inpaint image" }, { "id": "4e7a2c19-8d3b-4f51-a6e0-3c9b1d7f0012", "name": "mask", "type": "MASK", "linkIds": [ 126 ], "pos": [ -460, 740 ], "label": "inpaint mask" } ], "outputs": [ { "id": "4e7a2c19-8d3b-4f51-a6e0-3c9b1d7fffff", "name": "IMAGE", "type": "IMAGE", "linkIds": [ 118 ], "localized_name": "IMAGE", "pos": [ 0, 0 ] } ], "widgets": [], "nodes": [ { "id": 1, "type": "UNETLoader", "pos": [ 30, 230 ], "size": [ 270, 110 ], "flags": {}, "order": 0, "mode": 0, "inputs": [ { "localized_name": "unet_name", "name": "unet_name", "type": "COMBO", "widget": { "name": "unet_name" }, "link": 115 } ], "outputs": [ { "localized_name": "MODEL", "name": "MODEL", "type": "MODEL", "links": [ 101 ], "slot_index": 0 } ], "properties": { "Node name for S&R": "UNETLoader", "cnr_id": "comfy-core" }, "widgets_values": [ "nf2-bf16.safetensors", "default" ] }, { "id": 3, "type": "ModelSamplingAuraFlow", "pos": [ 950, 230 ], "size": [ 310, 104 ], "flags": {}, "order": 1, "mode": 0, "inputs": [ { "localized_name": "model", "name": "model", "type": "MODEL", "link": 119 } ], "outputs": [ { "localized_name": "MODEL", "name": "MODEL", "type": "MODEL", "links": [ 104 ], "slot_index": 0 } ], "properties": { "Node name for S&R": "ModelSamplingAuraFlow", "cnr_id": "comfy-core" }, "widgets_values": [ 3 ] }, { "id": 5, "type": "CLIPLoader", "pos": [ 30, 520 ], "size": [ 270, 140 ], "flags": {}, "order": 2, "mode": 0, "inputs": [ { "localized_name": "clip_name", "name": "clip_name", "type": "COMBO", "widget": { "name": "clip_name" }, "link": 116 } ], "outputs": [ { "localized_name": "CLIP", "name": "CLIP", "type": "CLIP", "links": [ 102 ], "slot_index": 0 } ], "properties": { "Node name for S&R": "CLIPLoader", "cnr_id": "comfy-core" }, "widgets_values": [ "qwen_3_4b.safetensors", "lumina2", "default" ] }, { "id": 6, "type": "CLIPTextEncode", "pos": [ 400, 230 ], "size": [ 450, 650 ], "flags": {}, "order": 3, "mode": 0, "inputs": [ { "localized_name": "clip", "name": "clip", "type": "CLIP", "link": 102 }, { "localized_name": "text", "name": "text", "type": "STRING", "widget": { "name": "text" }, "link": 110 } ], "outputs": [ { "localized_name": "CONDITIONING", "name": "CONDITIONING", "type": "CONDITIONING", "links": [ 103, 105 ], "slot_index": 0 } ], "properties": { "Node name for S&R": "CLIPTextEncode", "cnr_id": "comfy-core" }, "widgets_values": [ "A young woman with long wavy violet-purple hair and straight bangs, two small black ribbon bows in her hair, smiling softly at the camera. She wears a white sleeveless summer dress with thin straps, a ruffled sweetheart neckline and a light, flowing chiffon skirt." ] }, { "id": 7, "type": "ConditioningZeroOut", "pos": [ 630, 960 ], "size": [ 225, 72 ], "flags": {}, "order": 4, "mode": 0, "inputs": [ { "localized_name": "conditioning", "name": "conditioning", "type": "CONDITIONING", "link": 103 } ], "outputs": [ { "localized_name": "CONDITIONING", "name": "CONDITIONING", "type": "CONDITIONING", "links": [ 106 ], "slot_index": 0 } ], "properties": { "Node name for S&R": "ConditioningZeroOut", "cnr_id": "comfy-core" }, "widgets_values": [] }, { "id": 8, "type": "VAELoader", "pos": [ 30, 700 ], "size": [ 270, 110 ], "flags": {}, "order": 5, "mode": 0, "inputs": [ { "localized_name": "vae_name", "name": "vae_name", "type": "COMBO", "widget": { "name": "vae_name" }, "link": 117 } ], "outputs": [ { "localized_name": "VAE", "name": "VAE", "type": "VAE", "links": [ 109, 121 ], "slot_index": 0 } ], "properties": { "Node name for S&R": "VAELoader", "cnr_id": "comfy-core" }, "widgets_values": [ "ae.safetensors" ] }, { "id": 9, "type": "EmptySD3LatentImage", "pos": [ 40, 890 ], "size": [ 260, 170 ], "flags": {}, "order": 6, "mode": 0, "inputs": [ { "localized_name": "width", "name": "width", "type": "INT", "widget": { "name": "width" }, "link": 111 }, { "localized_name": "height", "name": "height", "type": "INT", "widget": { "name": "height" }, "link": 112 } ], "outputs": [ { "localized_name": "LATENT", "name": "LATENT", "type": "LATENT", "links": [ 107 ], "slot_index": 0 } ], "properties": { "Node name for S&R": "EmptySD3LatentImage", "cnr_id": "comfy-core" }, "widgets_values": [ 768, 1328, 1 ] }, { "id": 10, "type": "KSampler", "pos": [ 950, 400 ], "size": [ 320, 340 ], "flags": {}, "order": 7, "mode": 0, "inputs": [ { "localized_name": "model", "name": "model", "type": "MODEL", "link": 104 }, { "localized_name": "positive", "name": "positive", "type": "CONDITIONING", "link": 105 }, { "localized_name": "negative", "name": "negative", "type": "CONDITIONING", "link": 106 }, { "localized_name": "latent_image", "name": "latent_image", "type": "LATENT", "link": 107 }, { "localized_name": "seed", "name": "seed", "type": "INT", "widget": { "name": "seed" }, "link": 113 }, { "localized_name": "steps", "name": "steps", "type": "INT", "widget": { "name": "steps" }, "link": 114 } ], "outputs": [ { "localized_name": "LATENT", "name": "LATENT", "type": "LATENT", "links": [ 108 ], "slot_index": 0 } ], "properties": { "Node name for S&R": "KSampler", "cnr_id": "comfy-core" }, "widgets_values": [ 3, "fixed", 1, 1, "euler", "simple", 1.0 ] }, { "id": 12, "type": "VAEDecode", "pos": [ 1320, 230 ], "size": [ 225, 96 ], "flags": {}, "order": 8, "mode": 0, "inputs": [ { "localized_name": "samples", "name": "samples", "type": "LATENT", "link": 108 }, { "localized_name": "vae", "name": "vae", "type": "VAE", "link": 109 } ], "outputs": [ { "localized_name": "IMAGE", "name": "IMAGE", "type": "IMAGE", "links": [ 118 ], "slot_index": 0 } ], "properties": { "Node name for S&R": "VAEDecode", "cnr_id": "comfy-core" }, "widgets_values": [] }, { "id": 20, "type": "ModelPatchLoader", "pos": [ 30, 1180 ], "size": [ 270, 82 ], "flags": {}, "order": 0, "mode": 0, "inputs": [ { "localized_name": "name", "name": "name", "type": "COMBO", "widget": { "name": "name" }, "link": 123 } ], "outputs": [ { "localized_name": "MODEL_PATCH", "name": "MODEL_PATCH", "type": "MODEL_PATCH", "links": [ 120 ] } ], "properties": { "Node name for S&R": "ModelPatchLoader", "cnr_id": "comfy-core" }, "widgets_values": [ "NitroFusion2-Controlnet-Union.safetensors" ] }, { "id": 21, "type": "ZImageFunControlnet", "pos": [ 950, 880 ], "size": [ 320, 190 ], "flags": {}, "order": 0, "mode": 0, "inputs": [ { "localized_name": "model", "name": "model", "type": "MODEL", "link": 101 }, { "localized_name": "model_patch", "name": "model_patch", "type": "MODEL_PATCH", "link": 120 }, { "localized_name": "vae", "name": "vae", "type": "VAE", "link": 121 }, { "localized_name": "image", "name": "image", "shape": 7, "type": "IMAGE", "link": 122 }, { "localized_name": "inpaint_image", "name": "inpaint_image", "shape": 7, "type": "IMAGE", "link": 125 }, { "localized_name": "mask", "name": "mask", "shape": 7, "type": "MASK", "link": 126 }, { "localized_name": "strength", "name": "strength", "type": "FLOAT", "widget": { "name": "strength" }, "link": 124 } ], "outputs": [ { "localized_name": "MODEL", "name": "MODEL", "type": "MODEL", "links": [ 119 ] } ], "properties": { "Node name for S&R": "ZImageFunControlnet", "cnr_id": "comfy-core" }, "widgets_values": [ 1.0, 0.0, 1.0 ] } ], "groups": [ { "id": 1, "title": "Step2 - Image size", "bounding": [ 10, 820, 320, 280 ], "color": "#3f789e", "font_size": 24, "flags": {} }, { "id": 2, "title": "Step3 - Prompt", "bounding": [ 360, 130, 530, 970 ], "color": "#3f789e", "font_size": 24, "flags": {} }, { "id": 3, "title": "Step1 - Load models", "bounding": [ 0, 130, 330, 690 ], "color": "#3f789e", "font_size": 24, "flags": {} }, { "id": 4, "title": "Step4 - ControlNet", "bounding": [ 0, 1130, 330, 150 ], "color": "#3f789e", "font_size": 24, "flags": {} }, { "id": 5, "title": "ControlNet", "bounding": [ 940, 810, 370, 280 ], "color": "#3f789e", "font_size": 24, "flags": {} } ], "links": [ { "id": 101, "origin_id": 1, "origin_slot": 0, "target_id": 21, "target_slot": 0, "type": "MODEL" }, { "id": 102, "origin_id": 5, "origin_slot": 0, "target_id": 6, "target_slot": 0, "type": "CLIP" }, { "id": 103, "origin_id": 6, "origin_slot": 0, "target_id": 7, "target_slot": 0, "type": "CONDITIONING" }, { "id": 104, "origin_id": 3, "origin_slot": 0, "target_id": 10, "target_slot": 0, "type": "MODEL" }, { "id": 105, "origin_id": 6, "origin_slot": 0, "target_id": 10, "target_slot": 1, "type": "CONDITIONING" }, { "id": 106, "origin_id": 7, "origin_slot": 0, "target_id": 10, "target_slot": 2, "type": "CONDITIONING" }, { "id": 107, "origin_id": 9, "origin_slot": 0, "target_id": 10, "target_slot": 3, "type": "LATENT" }, { "id": 108, "origin_id": 10, "origin_slot": 0, "target_id": 12, "target_slot": 0, "type": "LATENT" }, { "id": 109, "origin_id": 8, "origin_slot": 0, "target_id": 12, "target_slot": 1, "type": "VAE" }, { "id": 110, "origin_id": -10, "origin_slot": 0, "target_id": 6, "target_slot": 1, "type": "STRING" }, { "id": 111, "origin_id": -10, "origin_slot": 1, "target_id": 9, "target_slot": 0, "type": "INT" }, { "id": 112, "origin_id": -10, "origin_slot": 2, "target_id": 9, "target_slot": 1, "type": "INT" }, { "id": 113, "origin_id": -10, "origin_slot": 3, "target_id": 10, "target_slot": 4, "type": "INT" }, { "id": 114, "origin_id": -10, "origin_slot": 4, "target_id": 10, "target_slot": 5, "type": "INT" }, { "id": 115, "origin_id": -10, "origin_slot": 5, "target_id": 1, "target_slot": 0, "type": "COMBO" }, { "id": 116, "origin_id": -10, "origin_slot": 6, "target_id": 5, "target_slot": 0, "type": "COMBO" }, { "id": 117, "origin_id": -10, "origin_slot": 7, "target_id": 8, "target_slot": 0, "type": "COMBO" }, { "id": 118, "origin_id": 12, "origin_slot": 0, "target_id": -20, "target_slot": 0, "type": "IMAGE" }, { "id": 119, "origin_id": 21, "origin_slot": 0, "target_id": 3, "target_slot": 0, "type": "MODEL" }, { "id": 120, "origin_id": 20, "origin_slot": 0, "target_id": 21, "target_slot": 1, "type": "MODEL_PATCH" }, { "id": 121, "origin_id": 8, "origin_slot": 0, "target_id": 21, "target_slot": 2, "type": "VAE" }, { "id": 122, "origin_id": -10, "origin_slot": 8, "target_id": 21, "target_slot": 3, "type": "IMAGE" }, { "id": 123, "origin_id": -10, "origin_slot": 9, "target_id": 20, "target_slot": 0, "type": "COMBO" }, { "id": 124, "origin_id": -10, "origin_slot": 10, "target_id": 21, "target_slot": 6, "type": "FLOAT" }, { "id": 125, "origin_id": -10, "origin_slot": 11, "target_id": 21, "target_slot": 4, "type": "IMAGE" }, { "id": 126, "origin_id": -10, "origin_slot": 12, "target_id": 21, "target_slot": 5, "type": "MASK" } ], "extra": { "workflowRendererVersion": "LG" } } ] }, "config": {}, "extra": { "ds": { "scale": 0.67, "offset": [ 840, 310 ] }, "workflowRendererVersion": "LG" }, "version": 0.4 }