video tab alpha releasee

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-03-20 14:31:30 -04:00
parent 9a85e45cb4
commit 5c46904fd8
20 changed files with 874 additions and 172 deletions
+2
View File
@@ -239,6 +239,8 @@ def vae_postprocess(tensor, model, output_type='np'):
if len(tensor.shape) == 3 and tensor.shape[0] == 3:
tensor = tensor.unsqueeze(0)
if hasattr(model, 'video_processor'):
if len(tensor.shape) == 6 and tensor.shape[1] == 1:
tensor = tensor.squeeze(0)
images = model.video_processor.postprocess_video(tensor, output_type='pil')
elif hasattr(model, 'image_processor'):
images = model.image_processor.postprocess(tensor, output_type=output_type)