sgl-project/sglang · error · ValueError
JoyEcho audio scheduler was not prepared.
Error message
JoyEcho audio scheduler was not prepared.
What it means
JoyEcho denoises audio and video jointly, so the context must carry a prepared audio scheduler (ctx.audio_scheduler). Its absence means context preparation was incomplete — the scheduler is created alongside audio latents in the prepare phase, so None indicates a broken or partial setup path.
Source
Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/joy_echo/denoising.py:459
"memory_video_len": memory_video_len,
"memory_audio_len": memory_audio_len,
"late_layer_ratio": late_layer_ratio,
"audio_replicated_for_sp": sp_on,
"video_memory_prefix_len": memory_video_len if sp_on else 0,
},
)
def _run_denoising_step(
self,
ctx: LTX2DenoisingContext,
step: DenoisingStepState,
batch: Req,
server_args: ServerArgs,
) -> None:
if ctx.audio_latents is None:
raise ValueError("JoyEcho requires audio latents for denoising.")
if ctx.audio_scheduler is None:
raise ValueError("JoyEcho audio scheduler was not prepared.")
sigmas = ctx.scheduler.sigmas
if not isinstance(sigmas, torch.Tensor):
raise ValueError("Expected scheduler.sigmas to be a tensor for JoyEcho.")
sigma = sigmas[step.step_index].to(
device=ctx.latents.device, dtype=torch.float32
)
sigma_next = sigmas[step.step_index + 1].to(
device=ctx.latents.device, dtype=torch.float32
)
sigma_val = float(sigma.item())
sigma_next_val = float(sigma_next.item())
model_inputs = self._prepare_ltx2_model_inputs(
ctx, step, batch, server_args, sigma
)
model_inputs, memory_meta = self._build_memory_model_inputs(View on GitHub (pinned to 0132848349)
Solutions
- Use the standard prepare path that builds both audio latents and the audio scheduler
- Ensure audio config (steps, schedule) is valid so scheduler construction doesn't bail
- Upgrade sglang so context preparation and the denoising step agree
Defensive patterns
Strategy: validation
Validate before calling
assert ctx.audio_scheduler is not None, 'prepare step must build the audio scheduler'
Type guard
def joyecho_ready(ctx) -> bool:
return ctx.audio_latents is not None and ctx.audio_scheduler is not None Prevention
- Use the library's standard prepare path instead of constructing contexts manually
- Fail fast after prepare if any audio component is missing
When it happens
Trigger: Reaching _run_denoising_step with a LTX2DenoisingContext whose audio_scheduler is None — e.g. a custom path constructing the context manually or a prepare step that returned early after failing to build the audio scheduler.
Common situations: Custom pipeline code constructing DenoisingContext directly; a failed/early-exited prepare step whose exception was swallowed; version mismatch where scheduler setup moved to a new hook.
Related errors
- Number of inference steps is 'None', you need to call 'set_t
- SP DMD renoise requires `batch.sp_audio_orig_num_frames`.
- JoyEcho requires audio latents for denoising.
- Expected scheduler.sigmas to be a tensor for JoyEcho.
- audio_sampling_rate must be set in processor_config or audio
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/4d21bd8f0e97c81d.
Report an issue: GitHub.