Files
comfyui-workflows/optimized/I2I/qwen/README.md
T

80 lines
4.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Qwen Image 2.1 — optimized I2I
Converts any supplied reference image into a photorealistic image of the same subject. The prompt is generic: identity, pose, clothing, accessories, colors, proportions, composition, and framing are inferred from the input rather than hard-coded.
## Reusable inputs
- `character_reference.png` in node `4` — replace with the reference image.
- Node `7` positive and negative prompts — adapt the transformation without describing a specific subject.
- Node `10` seed — change for alternate results or keep fixed for comparisons.
- Nodes `5` and `14` — change the generation and output dimensions. The default is portrait 1080×1920 for person-focused images.
## Optimization baseline
- Model: `qwen_image_2.1_int8_convrot.safetensors`
- Sampler: Euler CFG++
- Scheduler: beta
- Steps: 50
- CFG: 3.5
- Measured runtime: approximately 68.3 seconds on the RTX 3070 (Q-I2I-34; uncached runs vary)
The workflow uses the installed Qwen Image 2.1 stack and the flattened `images.image_1` reference input required by the API workflow.
- `workflow.json` — API-format workflow.
- `ui-workflow.json` — native ComfyUI web-editor workflow. Load this file in ComfyUI for an editable graph.
## Optimization matrix
All 34 planned rows have been tested. Keep the reference image, prompt, seed,
and dimensions from [`../variables.json`](../variables.json) fixed.
| ID | CFG | Steps | Sampler | Scheduler | Runtime (s) | Tested? | Current Best |
|---|---:|---:|---|---|---:|---|---|
| Q-I2I-01 | 3.5 | 40 | euler_cfg_pp | beta | 92.1* | Yes | No |
| Q-I2I-02 | 1.0 | 24 | euler_cfg_pp | beta | 35.0 | Yes | No |
| Q-I2I-03 | 1.1 | 24 | euler_cfg_pp | beta | 37.2 | Yes | No |
| Q-I2I-04 | 1.2 | 24 | euler_cfg_pp | beta | 32.9 | Yes | No |
| Q-I2I-05 | 1.3 | 24 | euler_cfg_pp | beta | 33.9 | Yes | No |
| Q-I2I-06 | 1.4 | 24 | euler_cfg_pp | beta | 31.2 | Yes | No |
| Q-I2I-07 | 1.5 | 24 | euler_cfg_pp | beta | 31.4 | Yes | No |
| Q-I2I-08 | 1.6 | 24 | euler_cfg_pp | beta | 37.0 | Yes | No |
| Q-I2I-09 | 1.8 | 24 | euler_cfg_pp | beta | 31.1 | Yes | No |
| Q-I2I-10 | 2.0 | 24 | euler_cfg_pp | beta | 37.9 | Yes | No |
| Q-I2I-11 | 2.2 | 24 | euler_cfg_pp | beta | 31.1 | Yes | No |
| Q-I2I-12 | 2.4 | 24 | euler_cfg_pp | beta | 32.6 | Yes | No |
| Q-I2I-13 | 2.5 | 24 | euler_cfg_pp | beta | 36.8 | Yes | No |
| Q-I2I-14 | 2.7 | 24 | euler_cfg_pp | beta | 34.7 | Yes | No |
| Q-I2I-15 | 3.0 | 24 | euler_cfg_pp | beta | 33.9 | Yes | No |
| Q-I2I-16 | 3.2 | 24 | euler_cfg_pp | beta | 34.4 | Yes | No |
| Q-I2I-17 | 3.5 | 24 | euler_cfg_pp | beta | 37.6 | Yes | No |
| Q-I2I-18 | 3.8 | 24 | euler_cfg_pp | beta | 37.7 | Yes | No |
| Q-I2I-19 | 4.0 | 24 | euler_cfg_pp | beta | 31.2 | Yes | No |
| Q-I2I-20 | 3.5 | 24 | euler | beta | 37.6 | Yes | No |
| Q-I2I-21 | 3.5 | 24 | euler_ancestral | beta | 31.5 | Yes | No |
| Q-I2I-22 | 3.5 | 24 | euler_ancestral_cfg_pp | beta | 33.1 | Yes | No |
| Q-I2I-23 | 3.5 | 24 | res_multistep | beta | 32.5 | Yes | No |
| Q-I2I-24 | 3.5 | 24 | res_multistep_cfg_pp | beta | 38.7 | Yes | No |
| Q-I2I-25 | 3.5 | 24 | res_multistep_ancestral | beta | 42.8 | Yes | No |
| Q-I2I-26 | 3.5 | 24 | res_multistep_ancestral_cfg_pp | beta | 37.9 | Yes | No |
| Q-I2I-27 | 2.5 | 24 | euler_cfg_pp | simple | 36.1 | Yes | No |
| Q-I2I-28 | 2.5 | 24 | euler_cfg_pp | sgm_uniform | 37.3 | Yes | No |
| Q-I2I-29 | 2.5 | 24 | euler_cfg_pp | karras | 31.2 | Yes | No |
| Q-I2I-30 | 2.5 | 24 | euler_cfg_pp | exponential | 39.0 | Yes | No |
| Q-I2I-31 | 2.5 | 24 | euler_cfg_pp | normal | 35.2 | Yes | No |
| Q-I2I-32 | 3.5 | 30 | euler_cfg_pp | beta | 38.6 | Yes | No |
| Q-I2I-33 | 3.5 | 40 | euler_cfg_pp | beta | 58.7 | Yes | No |
| Q-I2I-34 | 3.5 | 50 | euler_cfg_pp | beta | 68.3 | Yes | Yes |
*Q-I2I-01 was a fully cached matrix replay at 0.23s; 92.1s is the uncached smoke runtime for the same settings.
## Evaluation
- **Current best: Q-I2I-34** — Euler CFG++, beta, CFG 3.5, 50 steps, 68.3s. Best overall balance of skin/material detail, face fidelity, clothing texture, and clean footwear.
- Q-I2I-33 was close and slightly faster at 58.7s, but Q-I2I-34 added visible fine texture without introducing a serious artifact.
- Q-I2I-01 remains a strong reference baseline, but its reported 0.23s matrix runtime was cached and is not comparable.
- Q-I2I-20–23 were valid alternatives; the non-CFG++/ancestral variants did not improve fidelity. Q-I2I-24–26 were rejected as corrupted outputs.
- Q-I2I-27–31 were valid scheduler comparisons, but none surpassed beta. Q-I2I-02–19 showed no better combination than the CFG 3.5/high-step result.
All rows are complete. Q-I2I-24–26 are retained as tested but rejected for
corrupted output; Q-I2I-34 is the sole Current Best.