Skip to content

Commit 41e1fd0

Browse files
yeahdongcnmickqian
andauthored
[diffusion] fix: webui cannot correctly display generated video using wan2.2 (sgl-project#18473)
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com> Co-authored-by: Mick <mickjagger19@icloud.com>
1 parent c34832c commit 41e1fd0

File tree

1 file changed

+11
-3
lines changed
  • python/sglang/multimodal_gen/apps/webui

1 file changed

+11
-3
lines changed

python/sglang/multimodal_gen/apps/webui/main.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,17 @@ def gradio_generate(
111111
sampling_params_str = "\n".join(
112112
[f"{key}: {value}" for key, value in sampling_params_kwargs.items()]
113113
)
114-
raise ValueError(
115-
f"No output is generated by client, and their sampling params is: {sampling_params_str}"
116-
)
114+
no_output_msg = f"No output is generated by client, and their sampling params is: {sampling_params_str}"
115+
116+
if batch.data_type == DataType.VIDEO:
117+
if os.path.exists(save_file_path):
118+
logger.warning(no_output_msg)
119+
return None, save_file_path
120+
else:
121+
no_output_msg += f"\nAnd the expected output file was not found at: {save_file_path}"
122+
raise ValueError(no_output_msg)
123+
else:
124+
raise ValueError(no_output_msg)
117125

118126
frames = post_process_sample(
119127
result.output[0],

0 commit comments

Comments
 (0)