{"record":{"id":"783ee6e71780a7ac","repo":"sgl-project/sglang","slug":"unsupported-content-type-header-content-type-783ee6","errorCode":null,"errorMessage":"Unsupported content type ${header.content_type}","messagePattern":"Unsupported content type (.+?)","errorType":"error_code","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/apps/realtime_webui/decoder_worker.js","lineNumber":144,"sourceCode":"      height: decoded.height,\n      chunk: Number(header.chunk_index),\n      frame_type: decoded.frame_type,\n      frames: decoded.frames,\n    };\n  } else if (header.content_type === RAW_RGB_CONTENT_TYPE) {\n    rawPayload = new Uint8Array(payload);\n    const frameBytes = Number(header.bytes_per_frame);\n    const count = Number(header.num_frames);\n    lastFrame = count > 0\n      ? rawPayload.slice((count - 1) * frameBytes, count * frameBytes)\n      : null;\n  } else if (\n    header.content_type === RAW_RGB_DELTA_GZIP_CONTENT_TYPE ||\n    header.content_type === RAW_RGBA_DELTA_GZIP_CONTENT_TYPE\n  ) {\n    rawPayload = await restoreDeltaGzipFrames(header, payload);\n  } else {\n    throw new Error(`Unsupported content type ${header.content_type}`);\n  }\n\n  return {\n    id: header.__decode_id,\n    width: Number(header.width),\n    height: Number(header.height),\n    chunk: Number(header.chunk_index),\n    frames: rawFramesToRgbaBuffers(header, rawPayload),\n  };\n}\n\nself.onmessage = async (event) => {\n  const message = event.data;\n  try {\n    if (message.type === \"reset\") {\n      reset();\n      return;\n    }","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/apps/realtime_webui/decoder_worker.js#L126-L162","documentation":"Identical to the float32 case but in the Half branch: deterministic_all_reduce packs fp16 elements into P::size vectors and requires out.numel() divisible by that width.","triggerScenarios":"Calling deterministic_all_reduce with a float16 tensor whose element count is not a multiple of the pack width.","commonSituations":"fp16 serving with hidden sizes or slices not divisible by the pack width (commonly 8).","solutions":["Pad input to a multiple of the pack width, reduce, then slice","Ensure hidden size is a multiple of 8","Fall back to RCCL for this tensor"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"d = 8  # fp16 pack width\nassert out.numel() % d == 0, f'size must be multiple of {d}'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pad fp16 inputs to pack multiples","Avoid odd slices through the deterministic path"],"tags":["rocm","allreduce","deterministic","alignment","float16"],"backgroundTag":"size-alignment-mismatch","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}