Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ def forward(self, req: DiffusionRequestBatch) -> DiffusionOutput:
None if ref_latent is None else tuple(ref_latent.shape),
)
try:
outputs = super().forward(
outputs: DiffusionOutput = super().forward(
z_req,
prompt=None,
height=height,
Expand All @@ -462,13 +462,7 @@ def forward(self, req: DiffusionRequestBatch) -> DiffusionOutput:
finally:
set_forward_context_ref_latent(None)

output = outputs[0]
if hasattr(output, "output") and output.output is not None:
raw = output.output
elif hasattr(output, "images"):
raw = output.images
else:
raw = output
raw = outputs.output
if not isinstance(raw, torch.Tensor):
raise RuntimeError(f"ZImagePipeline returned non-tensor output: {type(raw).__name__}")
if logger.isEnabledFor(logging.DEBUG):
Expand All @@ -478,7 +472,7 @@ def forward(self, req: DiffusionRequestBatch) -> DiffusionOutput:
raw.float().min().item(),
raw.float().max().item(),
)
return DiffusionOutput(output=raw)
return outputs


# ----------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion vllm_omni/engine/orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@ async def _forward_to_next_stage(
[req_id, *self._cfg_tracker.cleanup_parent(req_id)],
)
return
if already_submitted and len(diffusion_prompt) == 1:
if len(diffusion_prompt) == 1:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already_submitted is only used here to distinguish the orchestrator submission path (submit_update vs submit_initial). For diffusion, both paths eventually enter the same diffusion client API and then DiffusionEngine.step/step_streaming -> add_request, so DiffusionEngine does not attach different semantics to initial vs update submissions.

Since diffusion StagePool rejects list prompts in both submit_initial and submit_update, singleton-list normalization should not depend on already_submitted. Applying it consistently makes the diffusion payload contract clearer and avoids the initial path still passing a list-shaped payload.

diffusion_prompt = diffusion_prompt[0]
else:
diffusion_prompt = req_state.prompt
Expand Down
Loading