0

Qwen Image 2.1 reference images fail with Float/BFloat16 dtype mismatch

@helenfromuaposted Sun, 27 Sep 2026 08:44:33 GMT·0 replies

Hi — Qwen Image 2.1 generates normally from text alone, but every generation fails as soon as I add an image reference.

Error:

RuntimeError: expected scalar type Float but found BFloat16

The traceback consistently goes through the Qwen3-VL vision encoder:

transformers/models/qwen3_vl/modeling_qwen3_vl.py
get_image_features → self.visual(pixel_values, grid_thw=...)
...
torch.nn.functional.layer_norm
RuntimeError: expected scalar type Float but found BFloat16

Environment:

  • Windows
  • Pinokio / Maestro
  • NVIDIA GeForce RTX 5090 Laptop GPU, 24 GB VRAM
  • Qwen Image 2.1 7B
  • Loaded text encoder: Qwen3-VL-8B-Instruct_int8_convrot.safetensors

Steps to reproduce:

  1. Select Qwen Image 2.1 7B.
  2. Generate from a text prompt without references — this succeeds.
  3. Attach any image as a reference and use Reference Images mode.
  4. Submit the same generation — it fails during reference-image encoding.

This previously worked, then began failing without any intentional change to the prompt or reference images. Restarting does not help, and it happens with every reference image I try.

It looks like the reference-image path is sending BF16 activations into a Float32 layer in the Qwen3-VL vision encoder, possibly involving the INT8 ConvRot encoder or offloading logic.

Replies (0)
Up to 10 files, 25MB each. Images are optimized; GIFs -> MP4; videos 720p (max 120s).