Skip to content
Commit e4f69ebc authored by Stefy Lanza (nextime / spora )'s avatar Stefy Lanza (nextime / spora )
Browse files

three image failures that each reported something other than the cause



From the model test of 2026-11-01.

A mask handed over as a negative. encode_prompt returns a 2-tuple for several
families and nothing about its LENGTH says which: SD 1.x means
(prompt_embeds, negative_prompt_embeds), Krea 2 and Qwen-Image mean
(prompt_embeds, prompt_embeds_mask), MOSS-Image and Kromoss mean (embeds, mask)
and name the parameter prompt_attention_mask. The disambiguation looked for one
name -- the Krea spelling -- so MOSS fell through to the SD 1.x reading and its
boolean [B, S] mask was passed as negative_prompt_embeds. Every MOSS generation
then failed with "Prompt embeddings must be [B, S, C] with matching batch
size.": true, and about an argument the caller never meant to send. Now the
signature is asked for both spellings and, when it is silent, the tensors
decide -- a negative matches the positive in rank and width, a mask is boolean
or one rank short. The test that pinned the old check was called "told apart by
signature not by name" while asserting a single name, which is how the gap
survived.

An error with nothing after it. str(exc) is empty for any exception raised with
no arguments, and interpolating it produced "Image generation failed ... so this
is not a load failure." followed by nothing -- measured on Z-Image-Turbo, where
the reader could not tell a shape error from a full card. _exc_text always
names the type and says plainly when there is no message.

A promise the loader cannot keep. component_quantization's docstring said a
single-file component could be quantized as it loads. It cannot:
from_single_file given a bitsandbytes config takes the PRE-quantized path, so a
plain community fine-tune fails after the whole file is read, naming a tensor
instead of the cause. Refused up front now -- before the class lookup, which
`continue`s when the installed diffusers has no class for the component and so
skipped the check entirely -- naming the two routes that do work.

Also: the text-only image refusal on /v1/embeddings was gated on
`model_obj is None`, so the same request was refused 400 on a cold server and
admitted on a warm one, where only the loaded-object check stood between images
and a text-only encoder. A correctness check must not read a cache state.

Co-Authored-By: default avatarClaude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014T3rZozi1Ehk96NG1WesgC
parent b86e7e94
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment