sgl-project/sglang · critical · Error
This browser does not support worker image decoding
Error message
This browser does not support worker image decoding
What it means
The float32 branch of deterministic_all_reduce only launches cross_device_reduce_1stage kernels for world sizes 2,4,6,8. Any other fa->world_size_ throws.
Source
Thrown at python/sglang/multimodal_gen/apps/realtime_webui/decoder_worker.js:102
const bytes = payload instanceof Uint8Array ? payload : new Uint8Array(payload);
const lengths = Array.isArray(header.payload_lengths) && header.payload_lengths.length
? header.payload_lengths.map(Number)
: [bytes.byteLength];
const payloads = [];
let offset = 0;
for (const length of lengths) {
payloads.push(bytes.buffer.slice(
bytes.byteOffset + offset,
bytes.byteOffset + offset + length,
));
offset += length;
}
return payloads;
}
async function encodedFramesToImageBitmaps(header, payload) {
if (typeof createImageBitmap === "undefined") {
throw new Error("This browser does not support worker image decoding");
}
const frames = await Promise.all(splitEncodedPayload(header, payload).map((framePayload) => (
createImageBitmap(new Blob([framePayload], { type: header.content_type }))
)));
return {
width: frames[0]?.width || 0,
height: frames[0]?.height || 0,
frame_type: "bitmap",
frames,
};
}
async function decode(header, payload) {
let rawPayload;
if (
header.content_type === WEBP_FRAME_CONTENT_TYPE ||
header.content_type === JPEG_FRAME_CONTENT_TYPEView on GitHub (pinned to 0132848349)
Solutions
- Use TP in {2,4,6,8} for deterministic inference on ROCm
- Disable the deterministic custom kernel or fall back to RCCL for unsupported sizes
- Check visible-device masks so world size lands on a supported value
Defensive patterns
Strategy: validation
Validate before calling
assert fa.world_size_ in (2,4,6,8), 'deterministic allreduce needs TP in (2,4,6,8)'
Prevention
- Gate deterministic mode on supported TP sizes at startup
When it happens
Trigger: Invoking deterministic allreduce with a CustomAllreduce object whose world_size_ is not 2,4,6,8, with float32 tensors.
Common situations: Odd or >8 GPU deterministic runs (e.g. --enable-deterministic-inference with TP=3 or TP=16); deterministic mode enabled on topologies the kernel does not support.
Related errors
- Previous frame size does not match current delta payload
- Generate subcommand is not yet supported for model: {model_p
- Error: --model-type requires a non-empty value.
- delta payload size mismatch: expected ${expectedSize}, got $
- Missing previous frame for delta payload
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/5968e7d279b310c8.
Report an issue: GitHub.