[gradio] removed time and resolution limitation (#140)

This commit is contained in:
Frank Lee 2024-06-16 14:24:13 +08:00 committed by GitHub
parent 1771664792
commit ab75d98f92

View file

@ -438,29 +438,29 @@ def run_video_inference(
seed,
sampling_steps,
cfg_scale):
if (resolution == "480p" and length == "16s") or \
(resolution == "720p" and length in ["8s", "16s"]):
gr.Warning("Generation is interrupted as the combination of 480p and 16s will lead to CUDA out of memory")
else:
return run_inference(
"Text2Video",
prompt_text,
resolution,
aspect_ratio,
length,
motion_strength,
aesthetic_score,
use_motion_strength,
use_aesthetic_score,
camera_motion,
reference_image,
refine_prompt,
fps,
num_loop,
seed,
sampling_steps,
cfg_scale
)
# if (resolution == "480p" and length == "16s") or \
# (resolution == "720p" and length in ["8s", "16s"]):
# gr.Warning("Generation is interrupted as the combination of 480p and 16s will lead to CUDA out of memory")
# else:
return run_inference(
"Text2Video",
prompt_text,
resolution,
aspect_ratio,
length,
motion_strength,
aesthetic_score,
use_motion_strength,
use_aesthetic_score,
camera_motion,
reference_image,
refine_prompt,
fps,
num_loop,
seed,
sampling_steps,
cfg_scale
)
def generate_random_prompt():