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:22:55 -05:00
co-authored by Cursor
parent 4e61ee17b6
commit 1f10082087
5 changed files with 200 additions and 39 deletions
+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';