Spaces:
Runtime error
Runtime error
LanguageBind
commited on
Update opensora/serve/gradio_web_server.py
Browse files
opensora/serve/gradio_web_server.py
CHANGED
@@ -26,13 +26,13 @@ from opensora.serve.gradio_utils import block_css, title_markdown, randomize_see
|
|
26 |
from opensora.serve.gradio_utils import examples_txt, examples
|
27 |
|
28 |
@spaces.GPU(duration=300)
|
29 |
-
@torch.inference_mode()
|
30 |
-
|
31 |
@torch.inference_mode()
|
32 |
def generate_img(prompt, sample_steps, scale, seed=0, randomize_seed=False, force_images=False):
|
33 |
video_length = transformer_model.config.video_length if not force_images else 1
|
34 |
height, width = int(args.version.split('x')[1]), int(args.version.split('x')[2])
|
35 |
num_frames = 1 if video_length == 1 else int(args.version.split('x')[0])
|
|
|
|
|
36 |
if not force_images and prompt in examples_txt:
|
37 |
idx = examples_txt.index(prompt)
|
38 |
tmp_save_path = f'demo65-221/f65/{idx+1}.mp4'
|
|
|
26 |
from opensora.serve.gradio_utils import examples_txt, examples
|
27 |
|
28 |
@spaces.GPU(duration=300)
|
|
|
|
|
29 |
@torch.inference_mode()
|
30 |
def generate_img(prompt, sample_steps, scale, seed=0, randomize_seed=False, force_images=False):
|
31 |
video_length = transformer_model.config.video_length if not force_images else 1
|
32 |
height, width = int(args.version.split('x')[1]), int(args.version.split('x')[2])
|
33 |
num_frames = 1 if video_length == 1 else int(args.version.split('x')[0])
|
34 |
+
print(prompt in examples_txt)
|
35 |
+
print(prompt, examples_txt)
|
36 |
if not force_images and prompt in examples_txt:
|
37 |
idx = examples_txt.index(prompt)
|
38 |
tmp_save_path = f'demo65-221/f65/{idx+1}.mp4'
|