Fix Qwen 2.1 GGUF load: promote Q8 norms to F32 and wire TextEncode latent.

abenzerps Q8_0 ships 1D RMSNorms as packed Q8 (136 vs 128), which breaks
Comfy rms_rope; tagger now dequantizes small tensors and the graph uses
TextEncodeQwenImage21's 64-ch latent plus AuraFlow shift.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-09-20 16:58:00 -05:00
co-authored by Cursor
parent 68731916ca
commit 608f7d8d47
5 changed files with 200 additions and 39 deletions
+17 -32
View File
@@ -6,6 +6,14 @@
"class_type": "UnetLoaderGGUF",
"_meta": { "title": "Load Qwen 2.1 GGUF" }
},
"3": {
"inputs": {
"shift": 3.1,
"model": ["4", 0]
},
"class_type": "ModelSamplingAuraFlow",
"_meta": { "title": "Qwen 2.1 shift" }
},
"5": {
"inputs": {
"clip_name": "qwen3vl_8b_int8_convrot.safetensors",
@@ -22,38 +30,15 @@
"class_type": "VAELoader",
"_meta": { "title": "Load Qwen 2.1 VAE" }
},
"66": {
"inputs": {
"shift": 3.1,
"model": ["4", 0]
},
"class_type": "ModelSamplingAuraFlow",
"_meta": { "title": "ModelSamplingAuraFlow" }
},
"9": {
"inputs": {
"text": "",
"clip": ["5", 0]
"clip": ["5", 0],
"prompt": "",
"negative_prompt": "",
"resolution": 1024
},
"class_type": "CLIPTextEncode",
"_meta": { "title": "Positive Prompt" }
},
"10": {
"inputs": {
"text": "",
"clip": ["5", 0]
},
"class_type": "CLIPTextEncode",
"_meta": { "title": "Negative Prompt" }
},
"14": {
"inputs": {
"width": 1024,
"height": 1024,
"batch_size": 1
},
"class_type": "EmptySD3LatentImage",
"_meta": { "title": "Empty Latent" }
"class_type": "TextEncodeQwenImage21",
"_meta": { "title": "Text Encode Qwen Image 2.1" }
},
"15": {
"inputs": {
@@ -63,10 +48,10 @@
"sampler_name": "euler",
"scheduler": "simple",
"denoise": 1,
"model": ["66", 0],
"model": ["3", 0],
"positive": ["9", 0],
"negative": ["10", 0],
"latent_image": ["14", 0]
"negative": ["9", 1],
"latent_image": ["9", 2]
},
"class_type": "KSampler",
"_meta": { "title": "KSampler" }
+5 -5
View File
@@ -135,17 +135,17 @@ async function prepareGraph(r: any) {
s.width = size.width;
s.height = size.height;
graph = structuredClone(qwen21Template);
graph['9'].inputs.text = q.compiledPrompt;
graph['10'].inputs.text = stylePrompt(q.imageStyles, true);
graph['14'].inputs.width = size.width;
graph['14'].inputs.height = size.height;
graph['9'].inputs.prompt = q.compiledPrompt;
graph['9'].inputs.negative_prompt = stylePrompt(q.imageStyles, true);
// TextEncodeQwenImage21 builds the 64-ch empty latent from resolution (square T2I).
graph['9'].inputs.resolution = Math.max(size.width, size.height);
graph['15'].inputs.seed = s.seed;
graph['15'].inputs.steps = s.steps || 25;
graph['15'].inputs.cfg = s.cfg ?? 1;
graph['15'].inputs.sampler_name = 'euler';
graph['15'].inputs.scheduler = 'simple';
graph['21'].inputs.filename_prefix = prefix + '/image';
r.sampleLatent = 'empty latent';
r.sampleLatent = 'qwen21 textencode latent';
r.sampleDenoise = null;
r.heroReferenceAttached = false;
r.graphId = 'studio2_qwen21_t2i.json';