Nodes/JosiaNodes Lab/QwenImage2.1加速LoRA适配器
ComfyUI Node

QwenImage2.1加速LoRA适配器

Qwen-Image 2.1's speed LoRAs aren't normal LoRAs — this is the adapter that knows it

By Josia-doit·Created 22 days ago·Updated 6 days ago· 1
QwenImage2.1加速LoRA适配器
  • model
  • sigmas
  • latent
  • model
  • sampler
  • sigmas
◄选择LoRA使用官方 Qwen Image 2.1 Turbo 模型(不挂 LoRA)►
◄加速LoRA类型Viggle Turbo(6 步)►
◄采样器euler►

The 30-second version

Qwen-Image 2.1 ships two official speed LoRAs, and neither behaves like something you'd feed into LoraLoaderModelOnly. Fun PDD isn't a plain adapter - it carries whole parameters and four switchable output heads on top of the usual lora_A/lora_B pairs. Viggle Turbo is a plain rank-128 LoRA, but the official guidance is specifically to not merge it into the weights. Both routes also want their own sampler and their own very particular sigma schedule.

JosiaQwenAccel (displayed as QwenImage2.1加速LoRA适配器) bundles all of that into one node: pick the file and the type, get back a patched model plus the exact sampler and sigmas that go with it. Distilled students bake their guidance in and expect a specific noise schedule, so sampler and sigma are not a "try whatever" field.

How it works under the hood

Two routes live in qwen_accel.py and share nothing.

Fun PDD (4 steps). Qwen-Image-2.1-Fun-Acc-4Step.safetensors is an export tagged qwenimage21_extracted_prefused_v1. Beyond the low-rank pairs it carries around 65 full parameters and a proj_out.weight stacked four times - one output head per step. The node patches it through ComfyUI's normal LoRA machinery (comfy.lora.load_lora) at alpha 64 / rank 64, then picks a head each forward pass by matching the current sigma to the nearest of four. That's why it refuses a schedule it didn't write: sampling is pinned to euler, and sigma is the finished official set - 1.0, 0.9169867038726807, 0.7861579060554504, 0.5494909882545471, 0.0, trailing zero included. It also demands a native Qwen-Image 2.1 base - hand it a 2509/2511 build or a Diffusers conversion and it raises.

Viggle Turbo (6 steps). Qwen-Image-2.1-viggle-turbo-v0.2.1-6step-lora-r128.safetensors is a normal LoRA, and the node deliberately keeps it unmerged. Instead of folding B·A into the weights it wraps the diffusion model and adds the contribution in a forward hook - hooks removed after every call, so nothing leaks into other graphs. The official source comment gives the reason: under bf16, round-to-nearest merging keeps only ~70% of the update magnitude, and int8 requantization adds roughly four times the noise.

Sigma here is the interesting part. The official ViggleTurboSigmas box holds t-values - 1.0, 0.9375, 0.875, 0.75, 0.5, 0.25 - which are not sigmas and are identical at every resolution. The node shifts them at runtime from the reference latent's token count (mu 0.5 → 0.9 across 256–8192 tokens), converts to real sigmas, appends a zero. No latent connected? It assumes 1024².

The controls that matter

Only three things are required:

  • 选择LoRA - a dropdown of .safetensors from your loras folder, with anything under QwenImage2.1/ sorted to the top. Switching type auto-selects that type's default file, and hand-picking one can back-infer the type from its name.
  • 加速LoRA类型 - Fun PDD(4 步) or Viggle Turbo(6 步). Changing it swaps file, sampler and sigma together.
  • 采样器 - six options (euler, euler_ancestral, heun, dpm_2, dpm_2_ancestral, lcm). Fun PDD only accepts euler and the front-end snaps the dropdown back; only Viggle is worth experimenting on.

Three optional inputs: model, sigmas, latent. Leave model unconnected and the node skips patching entirely, emitting only sampler and sigmas - handy for eyeballing the numbers before wiring the whole graph. Connect a SIGMAS from elsewhere and yours wins over the built-in set, which on the Fun PDD route means an immediate runtime error. The latent feed only does anything on Viggle, where it's how sigma gets its resolution.

Outputs are model, sampler, sigmas, all built for SamplerCustom. Keep CFG at 1 and skip the negative prompt - distilled guidance is already inside the model, and stacking more on top is exactly how you get the oversaturated look.

Install

No pip step and no downloads beyond the LoRAs themselves - pyproject.toml declares zero dependencies and the README agrees.

cd ComfyUI/custom_nodes
git clone https://github.com/Josia-doit/ComfyUI_Josia_Lab
# restart ComfyUI

Or search the pack title in ComfyUI Manager. Then drop the LoRA files into ComfyUI/models/loras/QwenImage2.1/ - where the author keeps them, and where the node looks first.

Common issues

"找不到 LoRA" - the file isn't where ComfyUI indexes it. Put it under loras/QwenImage2.1/ and refresh.

Fun PDD complains about its four sigmas - you wired a SIGMAS from elsewhere, or you're not using this node's sampler output. The schedule is checked against the timestep to within 1e-6; there's no slack.

Format mismatch - pick the Fun PDD file with the type set to Viggle (or vice versa) and you get a shape error naming the mismatched keys. The message suggests flipping 加速LoRA类型, and it's usually right.

Two smaller notes. The node deliberately doesn't touch KV cache settings, so whatever official cache nodes are in your graph stay in charge. And this is the author's experimental pack, split off from ComfyUI_JosiaNodes so nodes can appear and vanish without disturbing the stable one - no stability promise, so pin ComfyUI if a graph matters.

Category⚡️Josia实验区/Qwen加速

Inputs (6)

NameTypeDefaultDescription
选择LoRACOMBO使用官方 Qwen Image 2.1 Turbo 模型(不挂 LoRA)loras 目录里的 .safetensors。随便改名、换版本都不影响节点 —— 选哪个文件就按上面那个类型怎么加载;类型与文件的对应关系由你决定。最上面那项「使用官方 Qwen Image 2.1 Turbo 模型(不挂 LoRA)」是特例:选它 = 用官方 Turbo 检查点当基础模型、不挂任何 LoRA,节点只输出官方 8 步 sigma 和采样器。
加速LoRA类型COMBOViggle Turbo(6 步)Fun PDD(4 步)、Viggle Turbo(6 步)的加载方式、采样器、sigma 都不一样;官方 Turbo(8 步)是特例 —— 不挂 LoRA,用官方 Turbo 检查点当基础模型,节点只出官方 8 步 sigma。切这里只换加载方式和 sigma,采样器按类型收敛(Fun PDD 和官方 Turbo 都只认 euler);LoRA 文件不动,你选的那个照样按新类型走
采样器COMBOeulerFun PDD 一路只认 euler,切过去会自动跳回 euler;Viggle 可以换别的试试。
modeloptMODEL选填。不接 → 只把采样器和 sigma 传下去,方便单独接预览节点看数值;接了 → 正常打上加速 LoRA 再输出。
sigmasoptSIGMAS选填。不接 → 按「加速LoRA类型」自动用该类型官方那套 sigma;接了 → 以接进来的 SIGMAS 为准(比如接预览/调试节点看数值,或接别的节点改用它那一串)。
latentoptLATENT把送进采样器的那个 latent 拉根线过来(EmptyLatentImage 或 VAE Encode 的输出)。只有 Viggle 会用它按分辨率换算 sigma;Fun PDD 无视它。

Outputs (3)

NameTypeDescription
modelMODEL—
samplerSAMPLER—
sigmasSIGMAS—