ChenDY commited on
Commit
a8b01e4
Β·
verified Β·
1 Parent(s): 2647be6

2-step workflow: load the LoRA with ComfyUI-BypassLoRA

Browse files
README.md CHANGED
@@ -33,6 +33,8 @@ Supported conditions: Canny, HED, Depth, Pose, Scribble, Gray, and inpainting.
33
  - 1 step: [`workflows/nitrofusion2_controlnet_1step.json`](./workflows/nitrofusion2_controlnet_1step.json)
34
  - 2 steps: [`workflows/nitrofusion2_controlnet_2step.json`](./workflows/nitrofusion2_controlnet_2step.json)
35
 
 
 
36
  ## Model Card
37
 
38
  | Name | Description |
 
33
  - 1 step: [`workflows/nitrofusion2_controlnet_1step.json`](./workflows/nitrofusion2_controlnet_1step.json)
34
  - 2 steps: [`workflows/nitrofusion2_controlnet_2step.json`](./workflows/nitrofusion2_controlnet_2step.json)
35
 
36
+ The 2-step workflow loads the LoRA with [ComfyUI-BypassLoRA](https://github.com/ChenDarYen/ComfyUI-BypassLoRA). It applies the LoRA without merging it into the weights, which makes 2-step generation 1.5–3.5Γ— faster. The node includes the fix from [ComfyUI PR #17408](https://github.com/Comfy-Org/ComfyUI/pull/17408) until ComfyUI ships it.
37
+
38
  ## Model Card
39
 
40
  | Name | Description |
workflows/nitrofusion2_controlnet_2step.json CHANGED
@@ -23,7 +23,7 @@
23
  "title": "Read me",
24
  "properties": {},
25
  "widgets_values": [
26
- "# 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**loras**\n- [nf2-dedistill-lora.safetensors](https://huggingface.co/ChenDY/NitroFusion2/resolve/main/nf2-dedistill-lora.safetensors) (381.6 MB)\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 β”œβ”€β”€ πŸ“‚ loras/\n β”‚ └── nf2-dedistill-lora.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\nTwo steps on one shared sigma table (euler, simple). The shift (6) is preset. The step LoRA is applied on step 1 only (scale 0.5); step 2 runs NitroFusion2 alone. 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"
27
  ],
28
  "color": "#222",
29
  "bgcolor": "#000"
@@ -626,7 +626,7 @@
626
  },
627
  {
628
  "id": 2,
629
- "type": "LoraLoaderModelOnly",
630
  "pos": [
631
  30,
632
  370
@@ -676,8 +676,8 @@
676
  }
677
  ],
678
  "properties": {
679
- "Node name for S&R": "LoraLoaderModelOnly",
680
- "cnr_id": "comfy-core"
681
  },
682
  "widgets_values": [
683
  "nf2-dedistill-lora.safetensors",
@@ -687,7 +687,7 @@
687
  },
688
  {
689
  "id": 14,
690
- "type": "LoraLoaderModelOnly",
691
  "pos": [
692
  30,
693
  510
@@ -737,8 +737,8 @@
737
  }
738
  ],
739
  "properties": {
740
- "Node name for S&R": "LoraLoaderModelOnly",
741
- "cnr_id": "comfy-core"
742
  },
743
  "widgets_values": [
744
  "nf2-dedistill-lora.safetensors",
 
23
  "title": "Read me",
24
  "properties": {},
25
  "widgets_values": [
26
+ "# 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**loras**\n- [nf2-dedistill-lora.safetensors](https://huggingface.co/ChenDY/NitroFusion2/resolve/main/nf2-dedistill-lora.safetensors) (381.6 MB)\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 β”œβ”€β”€ πŸ“‚ loras/\n β”‚ └── nf2-dedistill-lora.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\nTwo steps on one shared sigma table (euler, simple). The shift (6) is preset. The step LoRA is applied on step 1 only (scale 0.5); step 2 runs NitroFusion2 alone. Keep cfg = 1.\n\nThe LoRA is loaded with **Load LoRA (Bypass, PR #17408, Model Only)** from [ComfyUI-BypassLoRA](https://github.com/ChenDarYen/ComfyUI-BypassLoRA), which applies it without merging it into the weights, so changing the scale between steps costs nothing (2-step generation is 1.5–3.5Γ— faster). Install it with `git clone https://github.com/ChenDarYen/ComfyUI-BypassLoRA` in `ComfyUI/custom_nodes`, or with Install via Git URL in ComfyUI-Manager.\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"
27
  ],
28
  "color": "#222",
29
  "bgcolor": "#000"
 
626
  },
627
  {
628
  "id": 2,
629
+ "type": "LoraLoaderBypassPR17408ModelOnly",
630
  "pos": [
631
  30,
632
  370
 
676
  }
677
  ],
678
  "properties": {
679
+ "Node name for S&R": "LoraLoaderBypassPR17408ModelOnly",
680
+ "aux_id": "ChenDarYen/ComfyUI-BypassLoRA"
681
  },
682
  "widgets_values": [
683
  "nf2-dedistill-lora.safetensors",
 
687
  },
688
  {
689
  "id": 14,
690
+ "type": "LoraLoaderBypassPR17408ModelOnly",
691
  "pos": [
692
  30,
693
  510
 
737
  }
738
  ],
739
  "properties": {
740
+ "Node name for S&R": "LoraLoaderBypassPR17408ModelOnly",
741
+ "aux_id": "ChenDarYen/ComfyUI-BypassLoRA"
742
  },
743
  "widgets_values": [
744
  "nf2-dedistill-lora.safetensors",