Spaces:
Sleeping
Sleeping
Anonymous
commited on
Commit
·
bfa1f1d
1
Parent(s):
a2ce0ab
remove 512
Browse files
app.py
CHANGED
|
@@ -64,27 +64,27 @@ def infer(prompt, output_size, seed, num_frames, ddim_steps, unconditional_guida
|
|
| 64 |
model = model_1024
|
| 65 |
fps = 28
|
| 66 |
num_frames = min(num_frames, 36)
|
| 67 |
-
elif output_size == "256x256":
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
|
| 89 |
if seed is None:
|
| 90 |
seed = int.from_bytes(os.urandom(2), "big")
|
|
@@ -287,11 +287,12 @@ with gr.Blocks(css=css) as demo:
|
|
| 287 |
with gr.Accordion('FreeNoise Parameters (feel free to adjust these parameters based on your prompt): ', open=False):
|
| 288 |
with gr.Row():
|
| 289 |
# output_size = gr.Dropdown(["320x512", "576x1024"], value="320x512", label="Output Size", info="250s for 512 model, 900s for 1024 model (32 frames). Recovering from sleeping will take more time to download ckpt")
|
| 290 |
-
output_size = gr.Dropdown(["256x256", "576x1024"], value="576x1024", label="Output Size", info="900s for 1024 model (32 frames). Recovering from sleeping will take more time to download ckpt")
|
|
|
|
| 291 |
with gr.Row():
|
| 292 |
num_frames = gr.Slider(label='Frames (a multiple of 4), max 36 for 1024 model',
|
| 293 |
minimum=16,
|
| 294 |
-
maximum=
|
| 295 |
step=4,
|
| 296 |
value=32)
|
| 297 |
ddim_steps = gr.Slider(label='DDIM Steps',
|
|
|
|
| 64 |
model = model_1024
|
| 65 |
fps = 28
|
| 66 |
num_frames = min(num_frames, 36)
|
| 67 |
+
# elif output_size == "256x256":
|
| 68 |
+
# width = 256
|
| 69 |
+
# height = 256
|
| 70 |
+
# ckpt_dir_256 = "checkpoints/base_256_v1"
|
| 71 |
+
# ckpt_path_256 = "checkpoints/base_256_v1/model_256.pth"
|
| 72 |
+
# config_256 = "configs/inference_t2v_tconv256_v1.0_freenoise.yaml"
|
| 73 |
+
# config_256 = OmegaConf.load(config_256)
|
| 74 |
+
# model_config_256 = config_256.pop("model", OmegaConf.create())
|
| 75 |
+
# model_256 = instantiate_from_config(model_config_256)
|
| 76 |
+
# model_256 = model_256.cuda()
|
| 77 |
+
# if not os.path.exists(ckpt_path_256):
|
| 78 |
+
# os.makedirs(ckpt_dir_256, exist_ok=True)
|
| 79 |
+
# hf_hub_download(repo_id="MoonQiu/LongerCrafter", filename="model_256.pth", local_dir=ckpt_dir_256)
|
| 80 |
+
# try:
|
| 81 |
+
# model_256 = load_model_checkpoint(model_256, ckpt_path_256)
|
| 82 |
+
# except:
|
| 83 |
+
# hf_hub_download(repo_id="MoonQiu/LongerCrafter", filename="model_256.pth", local_dir=ckpt_dir_256, force_download=True)
|
| 84 |
+
# model_256 = load_model_checkpoint(model_256, ckpt_path_256)
|
| 85 |
+
# model_256.eval()
|
| 86 |
+
# model = model_256
|
| 87 |
+
# fps = 8
|
| 88 |
|
| 89 |
if seed is None:
|
| 90 |
seed = int.from_bytes(os.urandom(2), "big")
|
|
|
|
| 287 |
with gr.Accordion('FreeNoise Parameters (feel free to adjust these parameters based on your prompt): ', open=False):
|
| 288 |
with gr.Row():
|
| 289 |
# output_size = gr.Dropdown(["320x512", "576x1024"], value="320x512", label="Output Size", info="250s for 512 model, 900s for 1024 model (32 frames). Recovering from sleeping will take more time to download ckpt")
|
| 290 |
+
# output_size = gr.Dropdown(["256x256", "576x1024"], value="576x1024", label="Output Size", info="900s for 1024 model (32 frames). Recovering from sleeping will take more time to download ckpt")
|
| 291 |
+
output_size = gr.Dropdown(["576x1024"], value="576x1024", label="Output Size", info="900s for 1024 model (32 frames). Recovering from sleeping will take more time to download ckpt")
|
| 292 |
with gr.Row():
|
| 293 |
num_frames = gr.Slider(label='Frames (a multiple of 4), max 36 for 1024 model',
|
| 294 |
minimum=16,
|
| 295 |
+
maximum=36,
|
| 296 |
step=4,
|
| 297 |
value=32)
|
| 298 |
ddim_steps = gr.Slider(label='DDIM Steps',
|