sdiazlor Cursor commited on
Commit
5365fc7
Β·
1 Parent(s): 7a93e02

fix: update naming and align with repo

Browse files

Co-authored-by: Cursor <cursoragent@cursor.com>

.gitattributes CHANGED
@@ -43,3 +43,4 @@ assets/Pruna-Q-Image-2.1-t2i-2048.png filter=lfs diff=lfs merge=lfs -text
43
  assets/Pruna-Q-Image-2.1.png filter=lfs diff=lfs merge=lfs -text
44
  assets/*.png filter=lfs diff=lfs merge=lfs -text
45
  assets/Pruna-Qwen-Image-2.1.png filter=lfs diff=lfs merge=lfs -text
 
 
43
  assets/Pruna-Q-Image-2.1.png filter=lfs diff=lfs merge=lfs -text
44
  assets/*.png filter=lfs diff=lfs merge=lfs -text
45
  assets/Pruna-Qwen-Image-2.1.png filter=lfs diff=lfs merge=lfs -text
46
+ P-Q-Image-2.1.png filter=lfs diff=lfs merge=lfs -text
P-Q-Image-2.1.png ADDED

Git LFS Details

  • SHA256: 7d2ce73cddc3c5642e9ae453f6181fcbacc167f5b9d43d04ebf3fd2a7e2b9960
  • Pointer size: 133 Bytes
  • Size of remote file: 30.8 MB
README.md CHANGED
@@ -1,7 +1,7 @@
1
  ---
2
  license: other
3
  license_name: qwen-research
4
- base_model: PrunaAI/Pruna-Q-Image-2.1
5
  pipeline_tag: text-to-image
6
  tags:
7
  - comfyui
@@ -12,11 +12,59 @@ tags:
12
  - distilled
13
  - few-step
14
  ---
15
-
16
- # Pruna-Q-Image-2.1 for ComfyUI
17
-
18
- ComfyUI-ready copies of the [Pruna-Q-Image-2.1](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1)
19
- few-step LoRA adapters for [Qwen-Image-2.1](https://huggingface.co/Qwen/Qwen-Image-2.1),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  plus example workflows for text-to-image and image editing.
21
 
22
  The adapters load with the native `LoraLoaderModelOnly` node on top of the
@@ -24,20 +72,66 @@ Qwen-Image-2.1 base checkpoint from
24
  [Comfy-Org/Qwen-Image-2.1](https://huggingface.co/Comfy-Org/Qwen-Image-2.1).
25
  No custom nodes are needed. Update ComfyUI to a version with native Qwen-Image-2.1 support.
26
 
27
- ## Files
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
 
29
- | File | Steps | Use |
30
- |---|:---:|---|
31
- | `p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors` | 6 | **Recommended.** Pure few-step distillation, best for editing. |
32
- | `p_q_image_2.1_upsampled_6_steps_v0.2_comfyui_bf16.safetensors` | 6 | Distills prompt upsampling into the adapter for improved visual quality. |
33
- | `p_q_image_2.1_8_steps_v0.1_comfyui_bf16.safetensors` | 8 | v0.1, higher quality. |
34
- | `p_q_image_2.1_5_steps_v0.1_comfyui_bf16.safetensors` | 5 | v0.1, higher speed, lower visual quality. |
35
 
36
- The weights are identical to the diffusers files in
37
- [PrunaAI/Pruna-Q-Image-2.1](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1).
38
- The ComfyUI copies store bf16 weights and explicit `.alpha` tensors, because
39
- ComfyUI does not read the PEFT `lora_alpha` from safetensors metadata. Without
40
- them, the v0.1 adapters would load at half strength.
 
 
 
41
 
42
  ## Setup
43
 
@@ -49,7 +143,7 @@ ComfyUI/
49
  β”œβ”€β”€ diffusion_models/
50
  β”‚ └── qwen_image_2.1_int8_convrot.safetensors (or qwen_image_2.1_bf16.safetensors)
51
  β”œβ”€β”€ loras/
52
- β”‚ └── p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors
53
  β”œβ”€β”€ text_encoders/
54
  β”‚ └── qwen3vl_8b_int8_convrot.safetensors
55
  └── vae/
@@ -66,21 +160,20 @@ Drag a file from [`workflows/`](workflows) into ComfyUI.
66
 
67
  | Workflow | Adapter |
68
  |---|---|
69
- | `pruna_q_image_2.1_v0.2_6step_t2i.json` | v0.2 basic (switch `lora_name` to upsampled) |
70
- | `pruna_q_image_2.1_v0.2_6step_image_edit.json` | v0.2 basic (switch `lora_name` to upsampled) |
71
- | `pruna_q_image_2.1_v0.1_8step_t2i.json` | v0.1 8-step |
72
- | `pruna_q_image_2.1_v0.1_8step_image_edit.json` | v0.1 8-step |
73
- | `pruna_q_image_2.1_v0.1_5step_t2i.json` | v0.1 5-step |
74
- | `pruna_q_image_2.1_v0.1_5step_image_edit.json` | v0.1 5-step |
75
 
76
- They are built from the official Qwen-Image-2.1 Turbo templates. Inside each
77
- subgraph, `UNETLoader` feeds `LoraLoaderModelOnly` at strength 1.0, and
78
- `SamplerCustomAdvanced` runs euler with cfg 1 and a fixed `ManualSigmas` schedule.
79
 
80
  ## Sampling settings
81
 
82
- Each adapter is trained for its own sigma schedule. `ManualSigmas` passes values
83
- through unchanged, so the workflows contain the final values the sampler runs on.
84
 
85
  | Adapter | ManualSigmas |
86
  |---|---|
@@ -89,26 +182,52 @@ through unchanged, so the workflows contain the final values the sampler runs on
89
  | v0.1, 5 steps | `1.0, 0.94, 0.857143, 0.666667, 0.4, 0` |
90
 
91
  - **cfg 1**, no negative prompt, sampler `euler`, LoRA strength **1.0**.
92
- - **v0.1** runs its sigmas unshifted, matching the diffusers quickstart.
93
- - **v0.2** applies the base model's exponential time shift to the raw schedule
94
- `1.0, 0.925, 0.85, 0.625, 0.375, 0.125`. The values above are shifted for
95
- 1024x1024 output (mu = 0.6935). The adapters were trained at 1K resolution only.
96
-
97
- ## Rebuilding
98
-
99
- ```bash
100
- python convert_to_comfyui.py --src ../Pruna-Q-Image-2.1 --dst .
101
- git clone --depth 1 https://github.com/Comfy-Org/workflow_templates
102
- python build_workflows.py --templates workflow_templates/templates --out workflows
103
- python verify_comfyui.py --comfyui /path/to/ComfyUI --src ../Pruna-Q-Image-2.1 --dst .
104
- ```
105
-
106
- `verify_comfyui.py` runs ComfyUI's own LoRA key mapping against the Comfy-Org
107
- checkpoint layout and checks that every target is patched with the same delta as diffusers.
108
 
109
  ## License
110
 
111
- The adapters follow the license of the base model. See [LICENSE](LICENSE) and
112
- [NOTICE](NOTICE), and review the
113
- [Qwen-Image-2.1 license](https://huggingface.co/Qwen/Qwen-Image-2.1) before using
114
- or redistributing the adapters.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: other
3
  license_name: qwen-research
4
+ base_model: PrunaAI/P-Q-Image-2.1
5
  pipeline_tag: text-to-image
6
  tags:
7
  - comfyui
 
12
  - distilled
13
  - few-step
14
  ---
15
+ <!-- header start -->
16
+ <!-- 200823 -->
17
+ <p align="center">
18
+ <img src="P-Q-Image-2.1.png" width="800">
19
+ </p>
20
+ <!-- header end -->
21
+
22
+ <p align="center">
23
+ <a href="https://github.com/PrunaAI/pruna">
24
+ <img src="https://img.shields.io/badge/GitHub-PrunaAI-9334E9?style=plastic&logo=github&logoColor=white" alt="GitHub">
25
+ </a>
26
+ &nbsp;
27
+ <a href="https://twitter.com/PrunaAI">
28
+ <img src="https://img.shields.io/badge/Twitter%2FX-@PrunaAI-9334E9?style=plastic&logo=x&logoColor=white" alt="Twitter/X">
29
+ </a>
30
+ &nbsp;
31
+ <a href="https://www.linkedin.com/company/pruna-ai">
32
+ <img src="https://img.shields.io/badge/LinkedIn-PrunaAI-9334E9?style=plastic&logo=linkedin&logoColor=white" alt="LinkedIn">
33
+ </a>
34
+ &nbsp;
35
+ <a href="https://discord.com/invite/JFQmtFKCjd">
36
+ <img src="https://img.shields.io/badge/Discord-Join%20us-9334E9?style=plastic&logo=discord&logoColor=white" alt="Discord">
37
+ </a>
38
+ &nbsp;
39
+ <a href="https://dashboard.pruna.ai/login?utm_source=huggingface&utm_medium=org_card&utm_campaign=hf_traffic">
40
+ <img src="https://img.shields.io/badge/Performance%20Models-Try%20them%20now-9334E9?style=plastic&logo=data:image/svg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Image-2.1</h1>
46
+
47
+ <h2>Few-step LoRA adapters for Qwen-Image-2.1 β€” ComfyUI</h2>
48
+
49
+ <h3>
50
+ <span style="color: #9334E9;">6 steps (v0.2), 5 or 8 steps (v0.1)</span>
51
+ &nbsp;Β·&nbsp;
52
+ <span style="color: #9334E9;">Up to 6.3x faster</span>
53
+ &nbsp;Β·&nbsp;
54
+ <span style="color: #9334E9;">No CFG</span>
55
+ &nbsp;Β·&nbsp;
56
+ Text-to-image and image editing
57
+ </h3>
58
+
59
+ </div>
60
+
61
+ **P-Q-Image-2.1** is a set of LoRA adapters that let
62
+ [`Qwen/Qwen-Image-2.1`](https://huggingface.co/Qwen/Qwen-Image-2.1) generate
63
+ and edit images in only 6 steps (v0.2), or 5 or 8 steps (v0.1). The adapters load
64
+ on top of the base model, so the pipeline, text encoder, and VAE stay unchanged.
65
+
66
+ This repository is the ComfyUI export of the original repo
67
+ [`PrunaAI/P-Q-Image-2.1`](https://huggingface.co/PrunaAI/P-Q-Image-2.1),
68
  plus example workflows for text-to-image and image editing.
69
 
70
  The adapters load with the native `LoraLoaderModelOnly` node on top of the
 
72
  [Comfy-Org/Qwen-Image-2.1](https://huggingface.co/Comfy-Org/Qwen-Image-2.1).
73
  No custom nodes are needed. Update ComfyUI to a version with native Qwen-Image-2.1 support.
74
 
75
+ > **v0.2: two new 6-step adapters.**
76
+ >
77
+ > - An advanced distillation for more faithful generation and editing.
78
+ > - The first distillation removing need for prompt upsampling into the LoRA, thus significantly reducing end-to-end generation.
79
+ > The v0.1 adapters remain available.
80
+
81
+ ## 6-step variants
82
+
83
+ Pick **6-steps** for faithful base-model behavior, or **6-steps-upsampled** for
84
+ improved visual quality from a short prompt, without a separate prompt-upsampling call.
85
+
86
+ | Variant | File | Steps | Trade-off |
87
+ |---|---|:---:|---|
88
+ | `6-steps` | `p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors` | 6 | **Advanced distillation.** Recommended for preserving inputs when editing. |
89
+ | `6-steps-upsampled` | `p_q_image_2.1_6_steps_upsampled_v0.2_comfyui_bf16.safetensors` | 6 | **Improved visual quality, shorter end-to-end generation.** The first distillation that removes the need for a separate prompt-upsampling step. |
90
+
91
+ **6-steps** is an advanced 6-step distillation of the base model. It is intended
92
+ as a drop-in replacement for the base model in existing generation and editing
93
+ workflows, using the adapter's step count and sigma schedule. It improves on the
94
+ v0.1 adapters in almost all categories and is particularly good at editing tasks
95
+ where preserving the input matters.
96
+
97
+ **6-steps-upsampled** distills the prompt upsampler recommended for
98
+ Qwen-Image-2.1 into a 6-step LoRA. It improves visual quality without a separate
99
+ prompt-upsampling call, which significantly reduces end-to-end generation time.
100
+ It may not reproduce exactly what the actual prompt upsampler would do, and we
101
+ will continue improving it.
102
+
103
+ <details>
104
+ <summary><b>See the 5-step vs 8-step adapters (v0.1)</b></summary>
105
+
106
+ ### v0.1
107
+
108
+ Both adapters are v0.1. Pick one based on whether you need **quality** or **speed**.
109
+
110
+ | Variant | File | Steps | Trade-off |
111
+ |---|---|:---:|---|
112
+ | `8-steps` | `p_q_image_2.1_8_steps_v0.1_comfyui_bf16.safetensors` | 8 | **Higher quality.** Recommended as the default. |
113
+ | `5-steps` | `p_q_image_2.1_5_steps_v0.1_comfyui_bf16.safetensors` | 5 | **Higher speed**, with noticeably lower visual quality. |
114
+
115
+ Each adapter is trained for its own sigma schedule. Load only one at a time.
116
+ For the v0.2 adapters, do not reuse the v0.1 schedules.
117
+
118
+ </details>
119
+
120
+ ## Prompts, editing, and resolution
121
 
122
+ For **6-steps**, use the same prompts and reference images you would use with the
123
+ base model. For **6-steps-upsampled**, start with your original prompt; the adapter
124
+ is intended to capture the benefit of prompt upsampling during generation.
125
+ Detailed prompts still let you specify the subject, setting, lighting, and style.
 
 
126
 
127
+ The adapters were trained at **1K resolution only**, with a mix of simple and
128
+ upsampled prompts, text-to-image generation, and single- and multi-image editing
129
+ with **up to 3 reference images**. Prompt upsampling is optional; detailed prompts
130
+ usually give better results.
131
+
132
+ Start at **1024 Γ— 1024** and use at most **3 reference images** for editing.
133
+ Higher resolutions (including 2K) and more reference images may work, but are
134
+ outside the training coverage, and quality may vary.
135
 
136
  ## Setup
137
 
 
143
  β”œβ”€β”€ diffusion_models/
144
  β”‚ └── qwen_image_2.1_int8_convrot.safetensors (or qwen_image_2.1_bf16.safetensors)
145
  β”œβ”€β”€ loras/
146
+ β”‚ └── p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors
147
  β”œβ”€β”€ text_encoders/
148
  β”‚ └── qwen3vl_8b_int8_convrot.safetensors
149
  └── vae/
 
160
 
161
  | Workflow | Adapter |
162
  |---|---|
163
+ | `pruna_q_image_2.1_v0.2_6step_t2i.json` | v0.2 `6-steps` (switch `lora_name` to `6-steps-upsampled`) |
164
+ | `pruna_q_image_2.1_v0.2_6step_image_edit.json` | v0.2 `6-steps` (switch `lora_name` to `6-steps-upsampled`) |
165
+ | `pruna_q_image_2.1_v0.1_8step_t2i.json` | v0.1 `8-steps` |
166
+ | `pruna_q_image_2.1_v0.1_8step_image_edit.json` | v0.1 `8-steps` |
167
+ | `pruna_q_image_2.1_v0.1_5step_t2i.json` | v0.1 `5-steps` |
168
+ | `pruna_q_image_2.1_v0.1_5step_image_edit.json` | v0.1 `5-steps` |
169
 
170
+ Each workflow loads one adapter at strength **1.0** and samples with `euler`,
171
+ cfg **1**, and the matching `ManualSigmas` schedule.
 
172
 
173
  ## Sampling settings
174
 
175
+ Use the sigma schedule that matches the adapter. Do not mix v0.1 and v0.2
176
+ schedules.
177
 
178
  | Adapter | ManualSigmas |
179
  |---|---|
 
182
  | v0.1, 5 steps | `1.0, 0.94, 0.857143, 0.666667, 0.4, 0` |
183
 
184
  - **cfg 1**, no negative prompt, sampler `euler`, LoRA strength **1.0**.
185
+ - The adapters were trained at 1K resolution only.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
 
187
  ## License
188
 
189
+ The end distilled model is based on Qwen-Image-2.1.
190
+
191
+ P-Q-Image-2.1 is a derivative of Qwen-Image-2.1 and is distributed
192
+ under the **Qwen RESEARCH LICENSE AGREEMENT**. Review its use restrictions
193
+ before using or redistributing the adapters. See [LICENSE](LICENSE) and
194
+ [NOTICE](NOTICE).
195
+
196
+ Qwen is licensed under the Qwen RESEARCH LICENSE AGREEMENT, Copyright (c) 2026
197
+ Hangzhou Tongyi Laboratory Technology Co., Ltd. All Rights Reserved.
198
+
199
+ ## What's next?
200
+
201
+ - **Use P-Q-Image-2.1 to generate and edit images with Qwen-Image-2.1 in a few steps.**
202
+ - Compress your own models with [Pruna](https://github.com/PrunaAI/pruna) and give us a ⭐️ for more efficiency!
203
+ - Want to use our optimized image models right away? Check [P-Image-Ideogram](https://www.pruna.ai/p-image-ideogram) and [P-Image-Edit](https://www.pruna.ai/p-image-edit).
204
+
205
+ <style>
206
+ .model-button {
207
+ display: inline-flex;
208
+ flex-direction: row;
209
+ justify-content: center;
210
+ align-items: center;
211
+ gap: 8px;
212
+
213
+ padding: 8px 20px;
214
+ border: none;
215
+ border-radius: 8px;
216
+
217
+ background: #9334e9;
218
+ color: #ffffff;
219
+
220
+ font-size: 14px;
221
+ font-weight: 400;
222
+ line-height: 1;
223
+ text-decoration: none;
224
+ white-space: nowrap;
225
+ cursor: pointer;
226
+
227
+ box-sizing: border-box;
228
+ overflow: visible;
229
+ opacity: 1;
230
+ }
231
+ </style>
232
+
233
+ <a href="https://dashboard.pruna.ai/login?utm_source=huggingface&utm_medium=model_card&utm_campaign=hf_traffic" class="model-button">Try our models</a>
build_workflows.py DELETED
@@ -1,206 +0,0 @@
1
- """Build Pruna-Q-Image-2.1 ComfyUI workflows from the official Qwen-Image-2.1 Turbo templates.
2
-
3
- The Turbo templates already sample with ManualSigmas and cfg 1. Each workflow
4
- swaps the Turbo checkpoint for the base checkpoint, inserts a
5
- LoraLoaderModelOnly between the UNet loader and the Qwen-Image-2.1 cache, exposes
6
- `lora_name` on the subgraph node, and writes the adapter's sigma schedule.
7
-
8
- Usage:
9
- git clone --depth 1 https://github.com/Comfy-Org/workflow_templates
10
- python build_workflows.py --templates workflow_templates/templates --out workflows
11
- """
12
-
13
- import argparse
14
- import copy
15
- import json
16
- import re
17
- import uuid
18
- from pathlib import Path
19
-
20
- REPO_URL = "https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI"
21
-
22
- TEMPLATES = {
23
- "t2i": ("image_qwen_image_2_1_turbo_t2i.json", "Text to Image"),
24
- "image_edit": ("image_qwen_image_2_1_turbo_image_edit.json", "Image Edit"),
25
- }
26
-
27
- VARIANTS = {
28
- "v0.2_6step": {
29
- "lora": "p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors",
30
- "alternatives": ["p_q_image_2.1_upsampled_6_steps_v0.2_comfyui_bf16.safetensors"],
31
- "steps": 6,
32
- "sigmas": "1.0, 0.961054, 0.918949, 0.769302, 0.545554, 0.222292, 0",
33
- },
34
- "v0.1_8step": {
35
- "lora": "p_q_image_2.1_8_steps_v0.1_comfyui_bf16.safetensors",
36
- "alternatives": [],
37
- "steps": 8,
38
- "sigmas": "1.0, 0.933333, 0.857143, 0.769231, 0.666667, 0.545455, 0.4, 0.222222, 0",
39
- },
40
- "v0.1_5step": {
41
- "lora": "p_q_image_2.1_5_steps_v0.1_comfyui_bf16.safetensors",
42
- "alternatives": [],
43
- "steps": 5,
44
- "sigmas": "1.0, 0.94, 0.857143, 0.666667, 0.4, 0",
45
- },
46
- }
47
-
48
- TEXT_RENAMES = {
49
- "qwen_image_2.1_turbo_bf16.safetensors": "qwen_image_2.1_bf16.safetensors",
50
- "qwen_image_2.1_turbo_int8_convrot.safetensors": "qwen_image_2.1_int8_convrot.safetensors",
51
- '\\"2.1 TURBO\\"': '\\"2.1 PRUNA\\"',
52
- }
53
-
54
-
55
- def node_of_type(nodes: list, node_type: str) -> dict:
56
- matches = [n for n in nodes if n["type"] == node_type]
57
- if len(matches) != 1:
58
- raise ValueError(f"expected one {node_type}, found {len(matches)}")
59
- return matches[0]
60
-
61
-
62
- def set_widget(node: dict, name: str, value, index: int) -> None:
63
- node["widgets_values"][index] = value
64
- if "widgets_values_named" in node:
65
- node["widgets_values_named"][name] = value
66
-
67
-
68
- def lora_list(variant: dict) -> list:
69
- return [variant["lora"], *variant["alternatives"]]
70
-
71
-
72
- def insert_lora(workflow: dict, subgraph: dict, proxy: dict, variant: dict) -> None:
73
- state = subgraph["state"]
74
- lora_id = state["lastNodeId"] + 1
75
- lora_out_link = state["lastLinkId"] + 1
76
- lora_name_link = state["lastLinkId"] + 2
77
- state["lastNodeId"], state["lastLinkId"] = lora_id, lora_name_link
78
- workflow["last_node_id"], workflow["last_link_id"] = lora_id, lora_name_link
79
-
80
- unet = node_of_type(subgraph["nodes"], "UNETLoader")
81
- cache = node_of_type(subgraph["nodes"], "QwenImage21Cache")
82
- model_link_id = unet["outputs"][0]["links"][0]
83
- model_link = next(l for l in subgraph["links"] if l["id"] == model_link_id)
84
- model_link["target_id"], model_link["target_slot"] = lora_id, 0
85
- cache["inputs"][0]["link"] = lora_out_link
86
-
87
- lora_name_slot = len(subgraph["inputs"])
88
- subgraph["inputs"].append({
89
- "id": str(uuid.uuid4()),
90
- "name": "lora_name",
91
- "type": "COMBO",
92
- "linkIds": [lora_name_link],
93
- "pos": [subgraph["inputs"][-1]["pos"][0], subgraph["inputs"][-1]["pos"][1] + 20],
94
- })
95
- subgraph["links"] += [
96
- {"id": lora_out_link, "origin_id": lora_id, "origin_slot": 0, "target_id": cache["id"], "target_slot": 0, "type": "MODEL"},
97
- {"id": lora_name_link, "origin_id": -10, "origin_slot": lora_name_slot, "target_id": lora_id, "target_slot": 1, "type": "COMBO"},
98
- ]
99
-
100
- x, y = unet["pos"]
101
- subgraph["nodes"].append({
102
- "id": lora_id,
103
- "type": "LoraLoaderModelOnly",
104
- "title": "Load Pruna-Q-Image-2.1 LoRA",
105
- "pos": [x, y + 120],
106
- "size": [510, 82],
107
- "flags": {},
108
- "order": unet.get("order", 0) + 1,
109
- "mode": 0,
110
- "inputs": [
111
- {"localized_name": "model", "name": "model", "type": "MODEL", "link": model_link_id},
112
- {"localized_name": "lora_name", "name": "lora_name", "type": "COMBO", "widget": {"name": "lora_name"}, "link": lora_name_link},
113
- {"localized_name": "strength_model", "name": "strength_model", "type": "FLOAT", "widget": {"name": "strength_model"}, "link": None},
114
- ],
115
- "outputs": [{"localized_name": "MODEL", "name": "MODEL", "type": "MODEL", "links": [lora_out_link]}],
116
- "properties": {
117
- "Node name for S&R": "LoraLoaderModelOnly",
118
- "models": [{"name": name, "url": f"{REPO_URL}/resolve/main/{name}", "directory": "loras"} for name in lora_list(variant)],
119
- },
120
- "widgets_values": [variant["lora"], 1.0],
121
- "widgets_values_named": {"lora_name": variant["lora"], "strength_model": 1.0},
122
- })
123
-
124
- proxy["inputs"].append({"label": "lora_name", "name": "lora_name", "type": "COMBO", "widget": {"name": "lora_name"}, "link": None})
125
- proxy["widgets_values"].append(variant["lora"])
126
- if "widgets_values_named" in proxy:
127
- proxy["widgets_values_named"]["lora_name"] = variant["lora"]
128
-
129
-
130
- def update_notes(workflow: dict, variant: dict) -> None:
131
- lora_links = "\n".join(f"- [{name}]({REPO_URL}/resolve/main/{name})" for name in lora_list(variant))
132
- lora_tree = "".join(
133
- f"β”‚ β”‚ {'β””' if i == len(lora_list(variant)) - 1 else 'β”œ'}── {name}\n" for i, name in enumerate(lora_list(variant))
134
- )
135
- steps_note = (
136
- f"- steps: this workflow runs the Qwen Image 2.1 base checkpoint with a Pruna-Q-Image-2.1 LoRA distilled for "
137
- f"**{variant['steps']} steps**. The schedule is fixed in the ManualSigmas node (`{variant['sigmas']}`). "
138
- f"Keep LoRA strength 1.0, cfg 1 and euler, and change the schedule only together with a different adapter."
139
- )
140
- if variant["alternatives"]:
141
- steps_note += (
142
- "\n- lora_name: `basic` is the faithful 6-step distillation; `upsampled` distills prompt upsampling into the "
143
- "adapter. Both use the same schedule."
144
- )
145
-
146
- for node in workflow["nodes"]:
147
- if node["type"] != "MarkdownNote":
148
- continue
149
- text = node["widgets_values"][0]
150
- text = re.sub(r"^- steps:.*$", lambda _: steps_note, text, flags=re.MULTILINE)
151
- text = text.replace(
152
- "**text_encoders**",
153
- f"**loras** ([PrunaAI/Pruna-Q-Image-2.1-ComfyUI]({REPO_URL}))\n\n{lora_links}\n\n**text_encoders**",
154
- )
155
- text = text.replace("β”‚ β”œβ”€β”€ πŸ“‚ text_encoders/", f"β”‚ β”œβ”€β”€ πŸ“‚ loras/\n{lora_tree}β”‚ β”œβ”€β”€ πŸ“‚ text_encoders/")
156
- set_widget(node, "text", text, 0)
157
-
158
-
159
- def build(template: dict, kind_label: str, variant_key: str, variant: dict) -> dict:
160
- serialized = json.dumps(template)
161
- for old, new in TEXT_RENAMES.items():
162
- serialized = serialized.replace(old, new)
163
- workflow = json.loads(serialized)
164
- workflow["id"] = str(uuid.uuid4())
165
- workflow["revision"] = 0
166
-
167
- subgraph = workflow["definitions"]["subgraphs"][0]
168
- subgraph["name"] = f"{kind_label} (Pruna-Q-Image-2.1 {variant_key.replace('_', ' ')})"
169
- proxy = node_of_type(workflow["nodes"], subgraph["id"])
170
-
171
- sigmas = node_of_type(subgraph["nodes"], "ManualSigmas")
172
- sigmas["title"] = f"Manual Sigmas (Pruna-Q-Image-2.1 {variant['steps']}-step schedule)"
173
- set_widget(sigmas, "sigmas", variant["sigmas"], 0)
174
-
175
- guider = node_of_type(subgraph["nodes"], "CFGGuider")
176
- set_widget(guider, "cfg", 1, 0)
177
- if "cfg" in proxy.get("widgets_values_named", {}):
178
- names = list(proxy["widgets_values_named"])
179
- set_widget(proxy, "cfg", 1, names.index("cfg"))
180
-
181
- save = node_of_type(workflow["nodes"], "SaveImageAdvanced")
182
- save["widgets_values"][0] = "Pruna_Q_Image_2.1"
183
-
184
- insert_lora(workflow, subgraph, proxy, variant)
185
- update_notes(workflow, variant)
186
- return workflow
187
-
188
-
189
- def main() -> None:
190
- parser = argparse.ArgumentParser()
191
- parser.add_argument("--templates", type=Path, required=True)
192
- parser.add_argument("--out", type=Path, required=True)
193
- args = parser.parse_args()
194
- args.out.mkdir(parents=True, exist_ok=True)
195
-
196
- for kind, (filename, kind_label) in TEMPLATES.items():
197
- template = json.loads((args.templates / filename).read_text())
198
- for variant_key, variant in VARIANTS.items():
199
- workflow = build(copy.deepcopy(template), kind_label, variant_key, variant)
200
- target = args.out / f"pruna_q_image_2.1_{variant_key}_{kind}.json"
201
- target.write_text(json.dumps(workflow, indent=2, ensure_ascii=False) + "\n")
202
- print(target)
203
-
204
-
205
- if __name__ == "__main__":
206
- main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
convert_to_comfyui.py DELETED
@@ -1,89 +0,0 @@
1
- """Convert the Pruna-Q-Image-2.1 PEFT LoRAs into ComfyUI-ready files.
2
-
3
- ComfyUI ignores safetensors metadata, so the PEFT `lora_alpha` of the v0.1
4
- adapters is written as explicit `.alpha` tensors. The v0.2 adapters already
5
- have alpha folded into B, so their `.alpha` equals the rank (scale 1.0).
6
-
7
- Usage:
8
- python convert_to_comfyui.py --src ../Pruna-Q-Image-2.1 --dst .
9
- """
10
-
11
- import argparse
12
- import json
13
- from pathlib import Path
14
-
15
- import torch
16
- from safetensors import safe_open
17
- from safetensors.torch import save_file
18
-
19
- ADAPTERS = {
20
- "p_q_image_2.1_basic_6_steps_v0.2.safetensors": {"steps": 6, "version": "v0.2"},
21
- "p_q_image_2.1_upsampled_6_steps_v0.2.safetensors": {"steps": 6, "version": "v0.2"},
22
- "p_q_image_2.1_8_steps_v0.1.safetensors": {"steps": 8, "version": "v0.1"},
23
- "p_q_image_2.1_5_steps_v0.1.safetensors": {"steps": 5, "version": "v0.1"},
24
- }
25
-
26
- # ComfyUI ManualSigmas values. v0.1 runs unshifted; v0.2 is the README schedule
27
- # after the base model's exponential time shift at 1024x1024 (mu = 0.6935).
28
- COMFYUI_SIGMAS = {
29
- ("v0.1", 8): "1.0, 0.933333, 0.857143, 0.769231, 0.666667, 0.545455, 0.4, 0.222222, 0",
30
- ("v0.1", 5): "1.0, 0.94, 0.857143, 0.666667, 0.4, 0",
31
- ("v0.2", 6): "1.0, 0.961054, 0.918949, 0.769302, 0.545554, 0.222292, 0",
32
- }
33
-
34
- PREFIX = "transformer."
35
-
36
-
37
- def lora_scale(metadata: dict) -> float:
38
- """Return the alpha / rank factor ComfyUI must apply on top of B @ A."""
39
- if "alpha folded" in metadata.get("scaling", ""):
40
- return 1.0
41
- config = json.loads(metadata["lora_adapter_metadata"])
42
- return config["transformer.lora_alpha"] / config["transformer.r"]
43
-
44
-
45
- def convert(src: Path, dst: Path, info: dict) -> Path:
46
- with safe_open(src, "pt") as f:
47
- metadata = f.metadata() or {}
48
- tensors = {k: f.get_tensor(k) for k in f.keys()}
49
-
50
- scale = lora_scale(metadata)
51
- out = {}
52
- for key, tensor in tensors.items():
53
- if not key.startswith(PREFIX):
54
- raise ValueError(f"{src.name}: unexpected key {key}")
55
- name = key[len(PREFIX):]
56
- out[name] = tensor.to(torch.bfloat16).contiguous()
57
- if name.endswith(".lora_A.weight"):
58
- module = name[: -len(".lora_A.weight")]
59
- rank = tensor.shape[0]
60
- out[f"{module}.alpha"] = torch.tensor(scale * rank, dtype=torch.float32)
61
-
62
- sigmas = COMFYUI_SIGMAS[(info["version"], info["steps"])]
63
- out_metadata = {
64
- "format": "pt",
65
- "base_model": "Qwen/Qwen-Image-2.1",
66
- "source_file": src.name,
67
- "steps": str(info["steps"]),
68
- "comfyui_manual_sigmas": sigmas,
69
- "cfg": "1.0",
70
- "lora_strength": "1.0",
71
- }
72
- target = dst / src.name.replace(".safetensors", "_comfyui_bf16.safetensors")
73
- save_file(out, target, metadata=out_metadata)
74
- return target
75
-
76
-
77
- def main() -> None:
78
- parser = argparse.ArgumentParser()
79
- parser.add_argument("--src", type=Path, required=True)
80
- parser.add_argument("--dst", type=Path, required=True)
81
- args = parser.parse_args()
82
-
83
- for filename, info in ADAPTERS.items():
84
- target = convert(args.src / filename, args.dst, info)
85
- print(f"{filename} -> {target.name} ({target.stat().st_size / 1e6:.0f} MB)")
86
-
87
-
88
- if __name__ == "__main__":
89
- main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
p_q_image_2.1_upsampled_6_steps_v0.2_comfyui_bf16.safetensors β†’ p_q_image_2.1_6_steps_upsampled_v0.2_comfyui_bf16.safetensors RENAMED
File without changes
p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors β†’ p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors RENAMED
File without changes
verify_comfyui.py DELETED
@@ -1,138 +0,0 @@
1
- """Check that ComfyUI loads every LoRA target and applies the same delta as diffusers.
2
-
3
- Runs ComfyUI's own `model_lora_keys_unet` and `load_lora` against the layout of
4
- the Comfy-Org Qwen-Image-2.1 checkpoint. Only the checkpoint's safetensors
5
- header is downloaded; weights are stand-ins on the meta device.
6
-
7
- Usage:
8
- python verify_comfyui.py --comfyui /path/to/ComfyUI --src ../Pruna-Q-Image-2.1 --dst .
9
- """
10
-
11
- import argparse
12
- import json
13
- import logging
14
- import struct
15
- import sys
16
- import urllib.request
17
- from pathlib import Path
18
- from types import SimpleNamespace
19
-
20
- import torch
21
- from safetensors import safe_open
22
- from safetensors.torch import load_file
23
-
24
- CHECKPOINT_URL = "https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_bf16.safetensors"
25
- SAMPLE_MODULES = (
26
- "transformer_blocks.0.attn.to_q",
27
- "transformer_blocks.7.img_mlp.gate_layer",
28
- "transformer_blocks.7.img_mlp.proj",
29
- "transformer_blocks.31.img_mlp.out",
30
- "img_in",
31
- "proj_out",
32
- )
33
-
34
-
35
- def fetch_header(url: str) -> dict:
36
- def read(start: int, end: int) -> bytes:
37
- request = urllib.request.Request(url, headers={"Range": f"bytes={start}-{end}"})
38
- return urllib.request.urlopen(request).read()
39
-
40
- size = struct.unpack("<Q", read(0, 7))[0]
41
- header = json.loads(read(8, 8 + size - 1))
42
- header.pop("__metadata__", None)
43
- return header
44
-
45
-
46
- def diffusers_scale(path: Path) -> float:
47
- with safe_open(path, "pt") as f:
48
- metadata = f.metadata() or {}
49
- if "alpha folded" in metadata.get("scaling", ""):
50
- return 1.0
51
- config = json.loads(metadata["lora_adapter_metadata"])
52
- return config["transformer.lora_alpha"] / config["transformer.r"]
53
-
54
-
55
- def main() -> None:
56
- parser = argparse.ArgumentParser()
57
- parser.add_argument("--comfyui", type=Path, required=True)
58
- parser.add_argument("--src", type=Path, required=True)
59
- parser.add_argument("--dst", type=Path, required=True)
60
- args = parser.parse_args()
61
-
62
- sys.path.insert(0, str(args.comfyui))
63
- sys.argv = [sys.argv[0], "--cpu"]
64
- import comfy.lora
65
- import comfy.model_base
66
-
67
- header = fetch_header(CHECKPOINT_URL)
68
- state_dict = {
69
- f"diffusion_model.{k}": torch.empty(v["shape"], device="meta")
70
- for k, v in header.items()
71
- if k.endswith(".weight")
72
- }
73
-
74
- class FakeQwenImage21(comfy.model_base.QwenImage21):
75
- def __init__(self):
76
- torch.nn.Module.__init__(self)
77
- self.model_config = SimpleNamespace(unet_config={"image_model": "qwen_image21"})
78
-
79
- def state_dict(self):
80
- return state_dict
81
-
82
- key_map = comfy.lora.model_lora_keys_unet(FakeQwenImage21(), {})
83
-
84
- missing_logs = []
85
- handler = logging.Handler()
86
- handler.emit = lambda record: missing_logs.append(record.getMessage())
87
- logging.getLogger().addHandler(handler)
88
-
89
- failed = False
90
- for converted in sorted(args.dst.glob("*_comfyui_bf16.safetensors")):
91
- source = args.src / converted.name.replace("_comfyui_bf16", "")
92
- lora = load_file(converted)
93
- original = load_file(source)
94
- scale = diffusers_scale(source)
95
-
96
- missing_logs.clear()
97
- patches = comfy.lora.load_lora(lora, key_map)
98
- modules = {k[: -len(".lora_A.weight")] for k in lora if k.endswith(".lora_A.weight")}
99
- not_loaded = [m for m in missing_logs if "not loaded" in m]
100
-
101
- shape_errors = []
102
- for module in modules:
103
- target = key_map[module]
104
- key, offset = (target, None) if isinstance(target, str) else target
105
- delta_shape = (lora[f"{module}.lora_B.weight"].shape[0], lora[f"{module}.lora_A.weight"].shape[1])
106
- weight_shape = tuple(state_dict[key].shape)
107
- expected = (offset[2], weight_shape[1]) if offset else weight_shape
108
- if delta_shape != expected:
109
- shape_errors.append((module, delta_shape, expected))
110
-
111
- max_err = 0.0
112
- for module in SAMPLE_MODULES:
113
- if f"{module}.lora_A.weight" not in lora:
114
- continue
115
- adapter = patches[key_map[module]]
116
- up, down, alpha = adapter.weights[0].float(), adapter.weights[1].float(), adapter.weights[2]
117
- comfy_delta = up @ down * (alpha / down.shape[0])
118
- a = original[f"transformer.{module}.lora_A.weight"].float()
119
- b = original[f"transformer.{module}.lora_B.weight"].float()
120
- diffusers_delta = b @ a * scale
121
- err = ((comfy_delta - diffusers_delta).abs().max() / diffusers_delta.abs().max()).item()
122
- max_err = max(max_err, err)
123
-
124
- ok = len(patches) == len(modules) and not not_loaded and not shape_errors and max_err < 1e-2
125
- failed |= not ok
126
- print(
127
- f"{'OK ' if ok else 'FAIL'} {converted.name}: {len(patches)}/{len(modules)} modules patched, "
128
- f"{len(not_loaded)} unloaded keys, {len(shape_errors)} shape errors, "
129
- f"max relative delta error {max_err:.2e} (diffusers scale {scale})"
130
- )
131
- for line in not_loaded[:5] + [str(e) for e in shape_errors[:5]]:
132
- print(" ", line)
133
-
134
- sys.exit(1 if failed else 0)
135
-
136
-
137
- if __name__ == "__main__":
138
- main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
workflows/pruna_q_image_2.1_v0.2_6step_image_edit.json CHANGED
@@ -192,7 +192,7 @@
192
  "auto",
193
  "default",
194
  "qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors",
195
- "p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors"
196
  ],
197
  "widgets_values_named": {
198
  "resolution": 0,
@@ -213,7 +213,7 @@
213
  "device": "auto",
214
  "dtype": "default",
215
  "clip_name_1": "qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors",
216
- "lora_name": "p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors"
217
  }
218
  },
219
  {
@@ -280,10 +280,10 @@
280
  "title": "Note: Usage",
281
  "properties": {},
282
  "widgets_values": [
283
- "## Size\nQwen Image 2.1 has native 2K (2048*2048) support for direct output.\n\n- resolution is a total pixel budget (not width or height). Aspect ratio is preserved.\n- Official default is 1024. The model supports up to 2048.\n- This template starts at 0: no resize beyond a multiple of 32.\n- Output follows image_1. Extra refs can differ in size or aspect.\n- custom_size off: canvas comes from the encode latent (image_1).\n- custom_size on: use ResolutionSelector width/height. Keep it close to the resized image_1 size, or the edit can shift.\n\n## Reference images\n- Up to 10 reference images (image_1 to image_10).\n- Mention them in the prompt as `<image1>`, `<image2>`, ...\n- image_1 is the edit target. The rest are references.\n\n## Custom settings\nIf you need custom settings, enter or unpack the subgraph to edit it. See the [Subgraph](https://docs.comfy.org/interface/features/subgraph) guide.\n\n## Parameters\n- prompt: edit instruction. Use `<image1>` ... `<image10>`.\n- negative_prompt: unused while cfg is 1.\n- cfg: keep 1 for the Qwen Image 2.1 official path. Raise it only if you use a negative prompt.\n- steps: this workflow runs the Qwen Image 2.1 base checkpoint with a Pruna-Q-Image-2.1 LoRA distilled for **6 steps**. The schedule is fixed in the ManualSigmas node (`1.0, 0.961054, 0.918949, 0.769302, 0.545554, 0.222292, 0`). Keep LoRA strength 1.0, cfg 1 and euler, and change the schedule only together with a different adapter.\n- lora_name: `basic` is the faithful 6-step distillation; `upsampled` distills prompt upsampling into the adapter. Both use the same schedule."
284
  ],
285
  "widgets_values_named": {
286
- "text": "## Size\nQwen Image 2.1 has native 2K (2048*2048) support for direct output.\n\n- resolution is a total pixel budget (not width or height). Aspect ratio is preserved.\n- Official default is 1024. The model supports up to 2048.\n- This template starts at 0: no resize beyond a multiple of 32.\n- Output follows image_1. Extra refs can differ in size or aspect.\n- custom_size off: canvas comes from the encode latent (image_1).\n- custom_size on: use ResolutionSelector width/height. Keep it close to the resized image_1 size, or the edit can shift.\n\n## Reference images\n- Up to 10 reference images (image_1 to image_10).\n- Mention them in the prompt as `<image1>`, `<image2>`, ...\n- image_1 is the edit target. The rest are references.\n\n## Custom settings\nIf you need custom settings, enter or unpack the subgraph to edit it. See the [Subgraph](https://docs.comfy.org/interface/features/subgraph) guide.\n\n## Parameters\n- prompt: edit instruction. Use `<image1>` ... `<image10>`.\n- negative_prompt: unused while cfg is 1.\n- cfg: keep 1 for the Qwen Image 2.1 official path. Raise it only if you use a negative prompt.\n- steps: this workflow runs the Qwen Image 2.1 base checkpoint with a Pruna-Q-Image-2.1 LoRA distilled for **6 steps**. The schedule is fixed in the ManualSigmas node (`1.0, 0.961054, 0.918949, 0.769302, 0.545554, 0.222292, 0`). Keep LoRA strength 1.0, cfg 1 and euler, and change the schedule only together with a different adapter.\n- lora_name: `basic` is the faithful 6-step distillation; `upsampled` distills prompt upsampling into the adapter. Both use the same schedule."
287
  },
288
  "color": "#222",
289
  "bgcolor": "#000"
@@ -384,10 +384,10 @@
384
  "title": "Note: Model links",
385
  "properties": {},
386
  "widgets_values": [
387
- "Guide: [Subgraph](https://docs.comfy.org/interface/features/subgraph)\n\n## Input Asset\n\n- [ballet_dancer_photography_minimalist_architecture.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/ballet_dancer_photography_minimalist_architecture.png)\n\n## Model Links\n\n- [Hugging Face:Comfy-Org/Qwen-Image-2.1](https://huggingface.co/Comfy-Org/Qwen-Image-2.1)\n- [ModelScope:Comfy-Org/Qwen-Image-2.1](https://modelscope.cn/models/Comfy-Org/Qwen-Image-2.1)\n\n**diffusion_models**\n\n- [qwen_image_2.1_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_bf16.safetensors) (13.25 GB)\n- [qwen_image_2.1_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_int8_convrot.safetensors) (6.76 GB)\n\n**loras** ([PrunaAI/Pruna-Q-Image-2.1-ComfyUI](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI))\n\n- [p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors)\n- [p_q_image_2.1_upsampled_6_steps_v0.2_comfyui_bf16.safetensors](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_upsampled_6_steps_v0.2_comfyui_bf16.safetensors)\n\n**text_encoders**\n\n- [qwen3vl_8b_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_bf16.safetensors) (16.33 GB)\n- [qwen3vl_8b_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_int8_convrot.safetensors) (8.71 GB) \n- [qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors) (8.82 GB)\n\n**vae**\n\n- [qwen_image_2.1_vae_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/vae/qwen_image_2.1_vae_bf16.safetensors) (644.2 MB)\n\n\n## Model Storage Location\n\n```\nπŸ“‚ ComfyUI/\nβ”œβ”€β”€ πŸ“‚ models/\nβ”‚ β”œβ”€β”€ πŸ“‚ diffusion_models/\nβ”‚ β”‚ β”œβ”€β”€ qwen_image_2.1_bf16.safetensors\nβ”‚ β”‚ └── qwen_image_2.1_int8_convrot.safetensors\nβ”‚ β”œβ”€β”€ πŸ“‚ loras/\nβ”‚ β”‚ β”œβ”€β”€ p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors\nβ”‚ β”‚ └── p_q_image_2.1_upsampled_6_steps_v0.2_comfyui_bf16.safetensors\nβ”‚ β”œβ”€β”€ πŸ“‚ text_encoders/\nβ”‚ β”‚ β”œβ”€β”€ qwen3vl_8b_bf16.safetensors\nβ”‚ β”‚ β”œβ”€β”€ qwen3vl_8b_int8_convrot.safetensors\nβ”‚ β”‚ └── qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensorsβ”‚ └── οΏ½οΏ½οΏ½ vae/\nβ”‚ └── qwen_image_2.1_vae_bf16.safetensors\n```\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n"
388
  ],
389
  "widgets_values_named": {
390
- "text": "Guide: [Subgraph](https://docs.comfy.org/interface/features/subgraph)\n\n## Input Asset\n\n- [ballet_dancer_photography_minimalist_architecture.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/ballet_dancer_photography_minimalist_architecture.png)\n\n## Model Links\n\n- [Hugging Face:Comfy-Org/Qwen-Image-2.1](https://huggingface.co/Comfy-Org/Qwen-Image-2.1)\n- [ModelScope:Comfy-Org/Qwen-Image-2.1](https://modelscope.cn/models/Comfy-Org/Qwen-Image-2.1)\n\n**diffusion_models**\n\n- [qwen_image_2.1_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_bf16.safetensors) (13.25 GB)\n- [qwen_image_2.1_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_int8_convrot.safetensors) (6.76 GB)\n\n**loras** ([PrunaAI/Pruna-Q-Image-2.1-ComfyUI](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI))\n\n- [p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors)\n- [p_q_image_2.1_upsampled_6_steps_v0.2_comfyui_bf16.safetensors](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_upsampled_6_steps_v0.2_comfyui_bf16.safetensors)\n\n**text_encoders**\n\n- [qwen3vl_8b_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_bf16.safetensors) (16.33 GB)\n- [qwen3vl_8b_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_int8_convrot.safetensors) (8.71 GB) \n- [qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors) (8.82 GB)\n\n**vae**\n\n- [qwen_image_2.1_vae_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/vae/qwen_image_2.1_vae_bf16.safetensors) (644.2 MB)\n\n\n## Model Storage Location\n\n```\nπŸ“‚ ComfyUI/\nβ”œβ”€β”€ πŸ“‚ models/\nβ”‚ β”œβ”€β”€ πŸ“‚ diffusion_models/\nβ”‚ β”‚ β”œβ”€β”€ qwen_image_2.1_bf16.safetensors\nβ”‚ β”‚ └── qwen_image_2.1_int8_convrot.safetensors\nβ”‚ β”œβ”€β”€ πŸ“‚ loras/\nβ”‚ β”‚ β”œβ”€β”€ p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors\nβ”‚ β”‚ └── p_q_image_2.1_upsampled_6_steps_v0.2_comfyui_bf16.safetensors\nβ”‚ β”œβ”€β”€ πŸ“‚ text_encoders/\nβ”‚ β”‚ β”œβ”€β”€ qwen3vl_8b_bf16.safetensors\nβ”‚ β”‚ β”œβ”€β”€ qwen3vl_8b_int8_convrot.safetensors\nβ”‚ β”‚ └── qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensorsβ”‚ └── πŸ“‚ vae/\nβ”‚ └── qwen_image_2.1_vae_bf16.safetensors\n```\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n"
391
  },
392
  "color": "#222",
393
  "bgcolor": "#000"
@@ -2205,23 +2205,23 @@
2205
  "Node name for S&R": "LoraLoaderModelOnly",
2206
  "models": [
2207
  {
2208
- "name": "p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors",
2209
- "url": "https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors",
2210
  "directory": "loras"
2211
  },
2212
  {
2213
- "name": "p_q_image_2.1_upsampled_6_steps_v0.2_comfyui_bf16.safetensors",
2214
- "url": "https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_upsampled_6_steps_v0.2_comfyui_bf16.safetensors",
2215
  "directory": "loras"
2216
  }
2217
  ]
2218
  },
2219
  "widgets_values": [
2220
- "p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors",
2221
  1.0
2222
  ],
2223
  "widgets_values_named": {
2224
- "lora_name": "p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors",
2225
  "strength_model": 1.0
2226
  }
2227
  }
 
192
  "auto",
193
  "default",
194
  "qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors",
195
+ "p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors"
196
  ],
197
  "widgets_values_named": {
198
  "resolution": 0,
 
213
  "device": "auto",
214
  "dtype": "default",
215
  "clip_name_1": "qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors",
216
+ "lora_name": "p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors"
217
  }
218
  },
219
  {
 
280
  "title": "Note: Usage",
281
  "properties": {},
282
  "widgets_values": [
283
+ "## Size\nQwen Image 2.1 has native 2K (2048*2048) support for direct output.\n\n- resolution is a total pixel budget (not width or height). Aspect ratio is preserved.\n- Official default is 1024. The model supports up to 2048.\n- This template starts at 0: no resize beyond a multiple of 32.\n- Output follows image_1. Extra refs can differ in size or aspect.\n- custom_size off: canvas comes from the encode latent (image_1).\n- custom_size on: use ResolutionSelector width/height. Keep it close to the resized image_1 size, or the edit can shift.\n\n## Reference images\n- Up to 10 reference images (image_1 to image_10).\n- Mention them in the prompt as `<image1>`, `<image2>`, ...\n- image_1 is the edit target. The rest are references.\n\n## Custom settings\nIf you need custom settings, enter or unpack the subgraph to edit it. See the [Subgraph](https://docs.comfy.org/interface/features/subgraph) guide.\n\n## Parameters\n- prompt: edit instruction. Use `<image1>` ... `<image10>`.\n- negative_prompt: unused while cfg is 1.\n- cfg: keep 1 for the Qwen Image 2.1 official path. Raise it only if you use a negative prompt.\n- steps: this workflow runs the Qwen Image 2.1 base checkpoint with a Pruna-Q-Image-2.1 LoRA distilled for **6 steps**. The schedule is fixed in the ManualSigmas node (`1.0, 0.961054, 0.918949, 0.769302, 0.545554, 0.222292, 0`). Keep LoRA strength 1.0, cfg 1 and euler, and change the schedule only together with a different adapter.\n- lora_name: `6-step` is the faithful distillation; `6-step-upsampled` distills prompt upsampling into the adapter. Both use the same schedule."
284
  ],
285
  "widgets_values_named": {
286
+ "text": "## Size\nQwen Image 2.1 has native 2K (2048*2048) support for direct output.\n\n- resolution is a total pixel budget (not width or height). Aspect ratio is preserved.\n- Official default is 1024. The model supports up to 2048.\n- This template starts at 0: no resize beyond a multiple of 32.\n- Output follows image_1. Extra refs can differ in size or aspect.\n- custom_size off: canvas comes from the encode latent (image_1).\n- custom_size on: use ResolutionSelector width/height. Keep it close to the resized image_1 size, or the edit can shift.\n\n## Reference images\n- Up to 10 reference images (image_1 to image_10).\n- Mention them in the prompt as `<image1>`, `<image2>`, ...\n- image_1 is the edit target. The rest are references.\n\n## Custom settings\nIf you need custom settings, enter or unpack the subgraph to edit it. See the [Subgraph](https://docs.comfy.org/interface/features/subgraph) guide.\n\n## Parameters\n- prompt: edit instruction. Use `<image1>` ... `<image10>`.\n- negative_prompt: unused while cfg is 1.\n- cfg: keep 1 for the Qwen Image 2.1 official path. Raise it only if you use a negative prompt.\n- steps: this workflow runs the Qwen Image 2.1 base checkpoint with a Pruna-Q-Image-2.1 LoRA distilled for **6 steps**. The schedule is fixed in the ManualSigmas node (`1.0, 0.961054, 0.918949, 0.769302, 0.545554, 0.222292, 0`). Keep LoRA strength 1.0, cfg 1 and euler, and change the schedule only together with a different adapter.\n- lora_name: `6-step` is the faithful distillation; `6-step-upsampled` distills prompt upsampling into the adapter. Both use the same schedule."
287
  },
288
  "color": "#222",
289
  "bgcolor": "#000"
 
384
  "title": "Note: Model links",
385
  "properties": {},
386
  "widgets_values": [
387
+ "Guide: [Subgraph](https://docs.comfy.org/interface/features/subgraph)\n\n## Input Asset\n\n- [ballet_dancer_photography_minimalist_architecture.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/ballet_dancer_photography_minimalist_architecture.png)\n\n## Model Links\n\n- [Hugging Face:Comfy-Org/Qwen-Image-2.1](https://huggingface.co/Comfy-Org/Qwen-Image-2.1)\n- [ModelScope:Comfy-Org/Qwen-Image-2.1](https://modelscope.cn/models/Comfy-Org/Qwen-Image-2.1)\n\n**diffusion_models**\n\n- [qwen_image_2.1_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_bf16.safetensors) (13.25 GB)\n- [qwen_image_2.1_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_int8_convrot.safetensors) (6.76 GB)\n\n**loras** ([PrunaAI/Pruna-Q-Image-2.1-ComfyUI](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI))\n\n- [p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors)\n- [p_q_image_2.1_6_steps_upsampled_v0.2_comfyui_bf16.safetensors](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_6_steps_upsampled_v0.2_comfyui_bf16.safetensors)\n\n**text_encoders**\n\n- [qwen3vl_8b_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_bf16.safetensors) (16.33 GB)\n- [qwen3vl_8b_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_int8_convrot.safetensors) (8.71 GB) \n- [qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors) (8.82 GB)\n\n**vae**\n\n- [qwen_image_2.1_vae_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/vae/qwen_image_2.1_vae_bf16.safetensors) (644.2 MB)\n\n\n## Model Storage Location\n\n```\nπŸ“‚ ComfyUI/\nβ”œβ”€β”€ πŸ“‚ models/\nβ”‚ β”œβ”€β”€ πŸ“‚ diffusion_models/\nβ”‚ β”‚ β”œβ”€β”€ qwen_image_2.1_bf16.safetensors\nβ”‚ β”‚ └── qwen_image_2.1_int8_convrot.safetensors\nβ”‚ β”œβ”€β”€ πŸ“‚ loras/\nβ”‚ β”‚ β”œβ”€β”€ p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors\nβ”‚ β”‚ └── p_q_image_2.1_6_steps_upsampled_v0.2_comfyui_bf16.safetensors\nβ”‚ β”œβ”€β”€ πŸ“‚ text_encoders/\nβ”‚ β”‚ β”œβ”€β”€ qwen3vl_8b_bf16.safetensors\nβ”‚ β”‚ β”œβ”€β”€ qwen3vl_8b_int8_convrot.safetensors\nβ”‚ β”‚ └── qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensorsβ”‚ └── πŸ“‚ vae/\nβ”‚ └── qwen_image_2.1_vae_bf16.safetensors\n```\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n"
388
  ],
389
  "widgets_values_named": {
390
+ "text": "Guide: [Subgraph](https://docs.comfy.org/interface/features/subgraph)\n\n## Input Asset\n\n- [ballet_dancer_photography_minimalist_architecture.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/ballet_dancer_photography_minimalist_architecture.png)\n\n## Model Links\n\n- [Hugging Face:Comfy-Org/Qwen-Image-2.1](https://huggingface.co/Comfy-Org/Qwen-Image-2.1)\n- [ModelScope:Comfy-Org/Qwen-Image-2.1](https://modelscope.cn/models/Comfy-Org/Qwen-Image-2.1)\n\n**diffusion_models**\n\n- [qwen_image_2.1_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_bf16.safetensors) (13.25 GB)\n- [qwen_image_2.1_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_int8_convrot.safetensors) (6.76 GB)\n\n**loras** ([PrunaAI/Pruna-Q-Image-2.1-ComfyUI](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI))\n\n- [p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors)\n- [p_q_image_2.1_6_steps_upsampled_v0.2_comfyui_bf16.safetensors](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_6_steps_upsampled_v0.2_comfyui_bf16.safetensors)\n\n**text_encoders**\n\n- [qwen3vl_8b_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_bf16.safetensors) (16.33 GB)\n- [qwen3vl_8b_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_int8_convrot.safetensors) (8.71 GB) \n- [qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors) (8.82 GB)\n\n**vae**\n\n- [qwen_image_2.1_vae_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/vae/qwen_image_2.1_vae_bf16.safetensors) (644.2 MB)\n\n\n## Model Storage Location\n\n```\nπŸ“‚ ComfyUI/\nβ”œβ”€β”€ πŸ“‚ models/\nβ”‚ β”œβ”€β”€ πŸ“‚ diffusion_models/\nβ”‚ β”‚ β”œβ”€β”€ qwen_image_2.1_bf16.safetensors\nβ”‚ β”‚ └── qwen_image_2.1_int8_convrot.safetensors\nβ”‚ β”œβ”€β”€ πŸ“‚ loras/\nβ”‚ β”‚ β”œβ”€β”€ p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors\nβ”‚ β”‚ └── p_q_image_2.1_6_steps_upsampled_v0.2_comfyui_bf16.safetensors\nβ”‚ β”œβ”€β”€ πŸ“‚ text_encoders/\nβ”‚ β”‚ β”œβ”€β”€ qwen3vl_8b_bf16.safetensors\nβ”‚ β”‚ β”œβ”€β”€ qwen3vl_8b_int8_convrot.safetensors\nβ”‚ β”‚ └── qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensorsβ”‚ └── πŸ“‚ vae/\nβ”‚ └── qwen_image_2.1_vae_bf16.safetensors\n```\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n"
391
  },
392
  "color": "#222",
393
  "bgcolor": "#000"
 
2205
  "Node name for S&R": "LoraLoaderModelOnly",
2206
  "models": [
2207
  {
2208
+ "name": "p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors",
2209
+ "url": "https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors",
2210
  "directory": "loras"
2211
  },
2212
  {
2213
+ "name": "p_q_image_2.1_6_steps_upsampled_v0.2_comfyui_bf16.safetensors",
2214
+ "url": "https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_6_steps_upsampled_v0.2_comfyui_bf16.safetensors",
2215
  "directory": "loras"
2216
  }
2217
  ]
2218
  },
2219
  "widgets_values": [
2220
+ "p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors",
2221
  1.0
2222
  ],
2223
  "widgets_values_named": {
2224
+ "lora_name": "p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors",
2225
  "strength_model": 1.0
2226
  }
2227
  }
workflows/pruna_q_image_2.1_v0.2_6step_t2i.json CHANGED
@@ -183,7 +183,7 @@
183
  "qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors",
184
  "auto",
185
  "default",
186
- "p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors"
187
  ],
188
  "widgets_values_named": {
189
  "prompt": "Underground techno event poster: black background, a two-line headline in heavy white grotesque capitals where the first line reads \"QWEN IMAGE\" and the second line reads \"2.1 PRUNA\", both lines the same very large size and each spanning the full poster width edge to edge, stacked tightly one above the other in the upper half, the decimal point in \"2.1\" rendered as a clearly visible full-size square dot, a scattered pile of overlapping black-and-white halftone portrait photos showing a mixed cast of different people, an elderly man, a young woman, a child and a bearded man among them, arranged in two loose rows across the lower half, every face is razor sharp and crisply in focus with fine detailed halftone dots, high micro-contrast, thin white grid lines, small fluorescent orange accent shapes, two-colour risograph print texture, square 1:1 poster format, both headline lines equally prominent, spelling exactly correct letter by letter, no other readable words, no watermark",
@@ -201,7 +201,7 @@
201
  "clip_name_1": "qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors",
202
  "device": "auto",
203
  "dtype_1": "default",
204
- "lora_name": "p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors"
205
  }
206
  },
207
  {
@@ -265,10 +265,10 @@
265
  "title": "Note: Model links",
266
  "properties": {},
267
  "widgets_values": [
268
- "Guide: [Subgraph](https://docs.comfy.org/interface/features/subgraph)\n\n## Model Links\n\n- [Hugging Face:Comfy-Org/Qwen-Image-2.1](https://huggingface.co/Comfy-Org/Qwen-Image-2.1)\n- [ModelScope:Comfy-Org/Qwen-Image-2.1](https://modelscope.cn/models/Comfy-Org/Qwen-Image-2.1)\n\n**diffusion_models**\n\n- [qwen_image_2.1_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_bf16.safetensors) (13.25 GB)\n- [qwen_image_2.1_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_int8_convrot.safetensors) (6.76 GB)\n\n**loras** ([PrunaAI/Pruna-Q-Image-2.1-ComfyUI](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI))\n\n- [p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors)\n- [p_q_image_2.1_upsampled_6_steps_v0.2_comfyui_bf16.safetensors](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_upsampled_6_steps_v0.2_comfyui_bf16.safetensors)\n\n**text_encoders**\n\n- [qwen3vl_8b_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_int8_convrot.safetensors) (8.71 GB)\n- [qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors) (8.82 GB)\n\n**vae**\n\n- [qwen_image_2.1_vae_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/vae/qwen_image_2.1_vae_bf16.safetensors) (644.2 MB)\n\n\n## Model Storage Location\n\n```\nπŸ“‚ ComfyUI/\nβ”œβ”€β”€ πŸ“‚ models/\nβ”‚ β”œβ”€β”€ πŸ“‚ diffusion_models/\nβ”‚ β”‚ β”œβ”€β”€ qwen_image_2.1_bf16.safetensors\nβ”‚ β”‚ └── qwen_image_2.1_int8_convrot.safetensors\nβ”‚ β”œβ”€β”€ πŸ“‚ loras/\nβ”‚ β”‚ β”œβ”€β”€ p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors\nβ”‚ β”‚ └── p_q_image_2.1_upsampled_6_steps_v0.2_comfyui_bf16.safetensors\nβ”‚ β”œβ”€β”€ πŸ“‚ text_encoders/\nβ”‚ β”‚ β”œβ”€β”€ qwen3vl_8b_int8_convrot.safetensors\nβ”‚ β”‚ └── qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors\nβ”‚ └── πŸ“‚ vae/\nβ”‚ └── qwen_image_2.1_vae_bf16.safetensors\n```\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n"
269
  ],
270
  "widgets_values_named": {
271
- "text": "Guide: [Subgraph](https://docs.comfy.org/interface/features/subgraph)\n\n## Model Links\n\n- [Hugging Face:Comfy-Org/Qwen-Image-2.1](https://huggingface.co/Comfy-Org/Qwen-Image-2.1)\n- [ModelScope:Comfy-Org/Qwen-Image-2.1](https://modelscope.cn/models/Comfy-Org/Qwen-Image-2.1)\n\n**diffusion_models**\n\n- [qwen_image_2.1_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_bf16.safetensors) (13.25 GB)\n- [qwen_image_2.1_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_int8_convrot.safetensors) (6.76 GB)\n\n**loras** ([PrunaAI/Pruna-Q-Image-2.1-ComfyUI](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI))\n\n- [p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors)\n- [p_q_image_2.1_upsampled_6_steps_v0.2_comfyui_bf16.safetensors](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_upsampled_6_steps_v0.2_comfyui_bf16.safetensors)\n\n**text_encoders**\n\n- [qwen3vl_8b_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_int8_convrot.safetensors) (8.71 GB)\n- [qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors) (8.82 GB)\n\n**vae**\n\n- [qwen_image_2.1_vae_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/vae/qwen_image_2.1_vae_bf16.safetensors) (644.2 MB)\n\n\n## Model Storage Location\n\n```\nπŸ“‚ ComfyUI/\nβ”œβ”€β”€ πŸ“‚ models/\nβ”‚ β”œβ”€β”€ πŸ“‚ diffusion_models/\nβ”‚ β”‚ β”œβ”€β”€ qwen_image_2.1_bf16.safetensors\nβ”‚ β”‚ └── qwen_image_2.1_int8_convrot.safetensors\nβ”‚ β”œβ”€β”€ πŸ“‚ loras/\nβ”‚ β”‚ β”œβ”€β”€ p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors\nβ”‚ β”‚ └── p_q_image_2.1_upsampled_6_steps_v0.2_comfyui_bf16.safetensors\nβ”‚ β”œβ”€β”€ πŸ“‚ text_encoders/\nβ”‚ β”‚ β”œβ”€β”€ qwen3vl_8b_int8_convrot.safetensors\nβ”‚ β”‚ └── qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors\nβ”‚ └── πŸ“‚ vae/\nβ”‚ └── qwen_image_2.1_vae_bf16.safetensors\n```\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n"
272
  },
273
  "color": "#222",
274
  "bgcolor": "#000"
@@ -292,10 +292,10 @@
292
  "title": "Note: Usage",
293
  "properties": {},
294
  "widgets_values": [
295
- "## Size\nQwen Image 2.1 has native 2K (2048*2048) support for direct output.\n\nOutput size comes from ResolutionSelector (width/height). Default is 1 megapixel (1024*1024). For native 2K, set 1:1 and 4 megapixels (2048*2048). Prefer multiples of 32.\n\n## Transparent Image\n\nTo generate a transparent image, wrap the prompt like this and replace the middle with the subject:\n\n---\nThis is an RGBA format image with transparency. `[your description]`. The image has an alpha channel and a transparent background.\n\n---\nSave as PNG to keep the alpha channel.\n\n## Parameters\n\n- prompt: what to generate. For RGBA, see Note: transparent.\n- negative_prompt: unused while cfg is 1.\n- cfg: keep 1 for the Qwen Image 2.1 official path. Raise it only if you use a negative prompt.\n- steps: this workflow runs the Qwen Image 2.1 base checkpoint with a Pruna-Q-Image-2.1 LoRA distilled for **6 steps**. The schedule is fixed in the ManualSigmas node (`1.0, 0.961054, 0.918949, 0.769302, 0.545554, 0.222292, 0`). Keep LoRA strength 1.0, cfg 1 and euler, and change the schedule only together with a different adapter.\n- lora_name: `basic` is the faithful 6-step distillation; `upsampled` distills prompt upsampling into the adapter. Both use the same schedule.\n"
296
  ],
297
  "widgets_values_named": {
298
- "text": "## Size\nQwen Image 2.1 has native 2K (2048*2048) support for direct output.\n\nOutput size comes from ResolutionSelector (width/height). Default is 1 megapixel (1024*1024). For native 2K, set 1:1 and 4 megapixels (2048*2048). Prefer multiples of 32.\n\n## Transparent Image\n\nTo generate a transparent image, wrap the prompt like this and replace the middle with the subject:\n\n---\nThis is an RGBA format image with transparency. `[your description]`. The image has an alpha channel and a transparent background.\n\n---\nSave as PNG to keep the alpha channel.\n\n## Parameters\n\n- prompt: what to generate. For RGBA, see Note: transparent.\n- negative_prompt: unused while cfg is 1.\n- cfg: keep 1 for the Qwen Image 2.1 official path. Raise it only if you use a negative prompt.\n- steps: this workflow runs the Qwen Image 2.1 base checkpoint with a Pruna-Q-Image-2.1 LoRA distilled for **6 steps**. The schedule is fixed in the ManualSigmas node (`1.0, 0.961054, 0.918949, 0.769302, 0.545554, 0.222292, 0`). Keep LoRA strength 1.0, cfg 1 and euler, and change the schedule only together with a different adapter.\n- lora_name: `basic` is the faithful 6-step distillation; `upsampled` distills prompt upsampling into the adapter. Both use the same schedule.\n"
299
  },
300
  "color": "#222",
301
  "bgcolor": "#000"
@@ -1648,23 +1648,23 @@
1648
  "Node name for S&R": "LoraLoaderModelOnly",
1649
  "models": [
1650
  {
1651
- "name": "p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors",
1652
- "url": "https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors",
1653
  "directory": "loras"
1654
  },
1655
  {
1656
- "name": "p_q_image_2.1_upsampled_6_steps_v0.2_comfyui_bf16.safetensors",
1657
- "url": "https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_upsampled_6_steps_v0.2_comfyui_bf16.safetensors",
1658
  "directory": "loras"
1659
  }
1660
  ]
1661
  },
1662
  "widgets_values": [
1663
- "p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors",
1664
  1.0
1665
  ],
1666
  "widgets_values_named": {
1667
- "lora_name": "p_q_image_2.1_basic_6_steps_v0.2_comfyui_bf16.safetensors",
1668
  "strength_model": 1.0
1669
  }
1670
  }
 
183
  "qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors",
184
  "auto",
185
  "default",
186
+ "p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors"
187
  ],
188
  "widgets_values_named": {
189
  "prompt": "Underground techno event poster: black background, a two-line headline in heavy white grotesque capitals where the first line reads \"QWEN IMAGE\" and the second line reads \"2.1 PRUNA\", both lines the same very large size and each spanning the full poster width edge to edge, stacked tightly one above the other in the upper half, the decimal point in \"2.1\" rendered as a clearly visible full-size square dot, a scattered pile of overlapping black-and-white halftone portrait photos showing a mixed cast of different people, an elderly man, a young woman, a child and a bearded man among them, arranged in two loose rows across the lower half, every face is razor sharp and crisply in focus with fine detailed halftone dots, high micro-contrast, thin white grid lines, small fluorescent orange accent shapes, two-colour risograph print texture, square 1:1 poster format, both headline lines equally prominent, spelling exactly correct letter by letter, no other readable words, no watermark",
 
201
  "clip_name_1": "qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors",
202
  "device": "auto",
203
  "dtype_1": "default",
204
+ "lora_name": "p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors"
205
  }
206
  },
207
  {
 
265
  "title": "Note: Model links",
266
  "properties": {},
267
  "widgets_values": [
268
+ "Guide: [Subgraph](https://docs.comfy.org/interface/features/subgraph)\n\n## Model Links\n\n- [Hugging Face:Comfy-Org/Qwen-Image-2.1](https://huggingface.co/Comfy-Org/Qwen-Image-2.1)\n- [ModelScope:Comfy-Org/Qwen-Image-2.1](https://modelscope.cn/models/Comfy-Org/Qwen-Image-2.1)\n\n**diffusion_models**\n\n- [qwen_image_2.1_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_bf16.safetensors) (13.25 GB)\n- [qwen_image_2.1_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_int8_convrot.safetensors) (6.76 GB)\n\n**loras** ([PrunaAI/Pruna-Q-Image-2.1-ComfyUI](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI))\n\n- [p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors)\n- [p_q_image_2.1_6_steps_upsampled_v0.2_comfyui_bf16.safetensors](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_6_steps_upsampled_v0.2_comfyui_bf16.safetensors)\n\n**text_encoders**\n\n- [qwen3vl_8b_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_int8_convrot.safetensors) (8.71 GB)\n- [qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors) (8.82 GB)\n\n**vae**\n\n- [qwen_image_2.1_vae_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/vae/qwen_image_2.1_vae_bf16.safetensors) (644.2 MB)\n\n\n## Model Storage Location\n\n```\nπŸ“‚ ComfyUI/\nβ”œβ”€β”€ πŸ“‚ models/\nβ”‚ β”œβ”€β”€ πŸ“‚ diffusion_models/\nβ”‚ β”‚ β”œβ”€β”€ qwen_image_2.1_bf16.safetensors\nβ”‚ β”‚ └── qwen_image_2.1_int8_convrot.safetensors\nβ”‚ β”œβ”€β”€ πŸ“‚ loras/\nβ”‚ β”‚ β”œβ”€β”€ p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors\nβ”‚ β”‚ └── p_q_image_2.1_6_steps_upsampled_v0.2_comfyui_bf16.safetensors\nβ”‚ β”œβ”€β”€ πŸ“‚ text_encoders/\nβ”‚ β”‚ β”œβ”€β”€ qwen3vl_8b_int8_convrot.safetensors\nβ”‚ β”‚ └── qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors\nβ”‚ └── πŸ“‚ vae/\nβ”‚ └── qwen_image_2.1_vae_bf16.safetensors\n```\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n"
269
  ],
270
  "widgets_values_named": {
271
+ "text": "Guide: [Subgraph](https://docs.comfy.org/interface/features/subgraph)\n\n## Model Links\n\n- [Hugging Face:Comfy-Org/Qwen-Image-2.1](https://huggingface.co/Comfy-Org/Qwen-Image-2.1)\n- [ModelScope:Comfy-Org/Qwen-Image-2.1](https://modelscope.cn/models/Comfy-Org/Qwen-Image-2.1)\n\n**diffusion_models**\n\n- [qwen_image_2.1_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_bf16.safetensors) (13.25 GB)\n- [qwen_image_2.1_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_int8_convrot.safetensors) (6.76 GB)\n\n**loras** ([PrunaAI/Pruna-Q-Image-2.1-ComfyUI](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI))\n\n- [p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors)\n- [p_q_image_2.1_6_steps_upsampled_v0.2_comfyui_bf16.safetensors](https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_6_steps_upsampled_v0.2_comfyui_bf16.safetensors)\n\n**text_encoders**\n\n- [qwen3vl_8b_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_int8_convrot.safetensors) (8.71 GB)\n- [qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors) (8.82 GB)\n\n**vae**\n\n- [qwen_image_2.1_vae_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/vae/qwen_image_2.1_vae_bf16.safetensors) (644.2 MB)\n\n\n## Model Storage Location\n\n```\nπŸ“‚ ComfyUI/\nβ”œβ”€β”€ πŸ“‚ models/\nβ”‚ β”œβ”€β”€ πŸ“‚ diffusion_models/\nβ”‚ β”‚ β”œβ”€β”€ qwen_image_2.1_bf16.safetensors\nβ”‚ β”‚ └── qwen_image_2.1_int8_convrot.safetensors\nβ”‚ β”œβ”€β”€ πŸ“‚ loras/\nβ”‚ β”‚ β”œβ”€β”€ p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors\nβ”‚ β”‚ └── p_q_image_2.1_6_steps_upsampled_v0.2_comfyui_bf16.safetensors\nβ”‚ β”œβ”€β”€ πŸ“‚ text_encoders/\nβ”‚ β”‚ β”œβ”€β”€ qwen3vl_8b_int8_convrot.safetensors\nβ”‚ β”‚ └── qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors\nβ”‚ └── πŸ“‚ vae/\nβ”‚ └── qwen_image_2.1_vae_bf16.safetensors\n```\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n"
272
  },
273
  "color": "#222",
274
  "bgcolor": "#000"
 
292
  "title": "Note: Usage",
293
  "properties": {},
294
  "widgets_values": [
295
+ "## Size\nQwen Image 2.1 has native 2K (2048*2048) support for direct output.\n\nOutput size comes from ResolutionSelector (width/height). Default is 1 megapixel (1024*1024). For native 2K, set 1:1 and 4 megapixels (2048*2048). Prefer multiples of 32.\n\n## Transparent Image\n\nTo generate a transparent image, wrap the prompt like this and replace the middle with the subject:\n\n---\nThis is an RGBA format image with transparency. `[your description]`. The image has an alpha channel and a transparent background.\n\n---\nSave as PNG to keep the alpha channel.\n\n## Parameters\n\n- prompt: what to generate. For RGBA, see Note: transparent.\n- negative_prompt: unused while cfg is 1.\n- cfg: keep 1 for the Qwen Image 2.1 official path. Raise it only if you use a negative prompt.\n- steps: this workflow runs the Qwen Image 2.1 base checkpoint with a Pruna-Q-Image-2.1 LoRA distilled for **6 steps**. The schedule is fixed in the ManualSigmas node (`1.0, 0.961054, 0.918949, 0.769302, 0.545554, 0.222292, 0`). Keep LoRA strength 1.0, cfg 1 and euler, and change the schedule only together with a different adapter.\n- lora_name: `6-step` is the faithful distillation; `6-step-upsampled` distills prompt upsampling into the adapter. Both use the same schedule.\n"
296
  ],
297
  "widgets_values_named": {
298
+ "text": "## Size\nQwen Image 2.1 has native 2K (2048*2048) support for direct output.\n\nOutput size comes from ResolutionSelector (width/height). Default is 1 megapixel (1024*1024). For native 2K, set 1:1 and 4 megapixels (2048*2048). Prefer multiples of 32.\n\n## Transparent Image\n\nTo generate a transparent image, wrap the prompt like this and replace the middle with the subject:\n\n---\nThis is an RGBA format image with transparency. `[your description]`. The image has an alpha channel and a transparent background.\n\n---\nSave as PNG to keep the alpha channel.\n\n## Parameters\n\n- prompt: what to generate. For RGBA, see Note: transparent.\n- negative_prompt: unused while cfg is 1.\n- cfg: keep 1 for the Qwen Image 2.1 official path. Raise it only if you use a negative prompt.\n- steps: this workflow runs the Qwen Image 2.1 base checkpoint with a Pruna-Q-Image-2.1 LoRA distilled for **6 steps**. The schedule is fixed in the ManualSigmas node (`1.0, 0.961054, 0.918949, 0.769302, 0.545554, 0.222292, 0`). Keep LoRA strength 1.0, cfg 1 and euler, and change the schedule only together with a different adapter.\n- lora_name: `6-step` is the faithful distillation; `6-step-upsampled` distills prompt upsampling into the adapter. Both use the same schedule.\n"
299
  },
300
  "color": "#222",
301
  "bgcolor": "#000"
 
1648
  "Node name for S&R": "LoraLoaderModelOnly",
1649
  "models": [
1650
  {
1651
+ "name": "p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors",
1652
+ "url": "https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors",
1653
  "directory": "loras"
1654
  },
1655
  {
1656
+ "name": "p_q_image_2.1_6_steps_upsampled_v0.2_comfyui_bf16.safetensors",
1657
+ "url": "https://huggingface.co/PrunaAI/Pruna-Q-Image-2.1-ComfyUI/resolve/main/p_q_image_2.1_6_steps_upsampled_v0.2_comfyui_bf16.safetensors",
1658
  "directory": "loras"
1659
  }
1660
  ]
1661
  },
1662
  "widgets_values": [
1663
+ "p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors",
1664
  1.0
1665
  ],
1666
  "widgets_values_named": {
1667
+ "lora_name": "p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors",
1668
  "strength_model": 1.0
1669
  }
1670
  }