Conversation
varshith15
commented
Dec 11, 2025
- adds a tensor shape error debug log and prints params, to help reproduce the issue
- also not a fix just yet, need to understand whats causing it
| out_tensor = out_tensor.permute(0, 2, 3, 1) | ||
|
|
||
| if out_tensor.dim() != 4 or out_tensor.shape[0] != 1 or out_tensor.shape[-1] != 3: | ||
| logging.error(f"[StreamDiffusion] Invalid output tensor shape for encoder: {out_tensor.shape}. Expected (1, H, W, 3). Params: {self.params}") |
There was a problem hiding this comment.
Btw you can also check the H, W dimensions by checking the self.params.get_output_resolution(). Although if we do that, we should probably cache the output resolution along the params so we're not re-computing the ouput dims every frame 🤔
WDYT?
There was a problem hiding this comment.
Also, when the output is not in the right format, we should probably return None and skip the output generation on put_video_frame. Otherwise we're still gonna break the encoder in the end.
There was a problem hiding this comment.
i didnt return None or skip because it might cause an issue with the timestamps on the frames because the put and get are async
i just wanted to understand what params cause it so that we can replicate it offline and fix it streamdiffusion instead?
There was a problem hiding this comment.
Skipping shouldn't cause any timestamp issues! Only if we don't output monotonic timestamps
victorges
left a comment
There was a problem hiding this comment.
LGTM anyway not a regression