bubbliiiing
commited on
Commit
·
933a5a0
1
Parent(s):
6379810
update ui
Browse files- cogvideox/ui/ui.py +3 -3
cogvideox/ui/ui.py
CHANGED
@@ -27,7 +27,7 @@ from transformers import (CLIPImageProcessor, CLIPVisionModelWithProjection,
|
|
27 |
T5EncoderModel, T5Tokenizer)
|
28 |
|
29 |
from cogvideox.data.bucket_sampler import ASPECT_RATIO_512, get_closest_ratio
|
30 |
-
from
|
31 |
from cogvideox.models.transformer3d import CogVideoXTransformer3DModel
|
32 |
from cogvideox.pipeline.pipeline_cogvideox import CogVideoX_Fun_Pipeline
|
33 |
from cogvideox.pipeline.pipeline_cogvideox_inpaint import \
|
@@ -1282,7 +1282,7 @@ def ui_eas(model_name, savedir_sample):
|
|
1282 |
show_label=False,
|
1283 |
visible=True,
|
1284 |
)
|
1285 |
-
length_slider = gr.Slider(label="Animation length (视频帧数)", value=
|
1286 |
|
1287 |
source_method = gr.Radio(
|
1288 |
["Text to Video (文本到视频)", "Image to Video (图片到视频)", "Video to Video (视频到视频)"],
|
@@ -1347,7 +1347,7 @@ def ui_eas(model_name, savedir_sample):
|
|
1347 |
|
1348 |
def upload_generation_method(generation_method):
|
1349 |
if generation_method == "Video Generation":
|
1350 |
-
return gr.update(visible=True, minimum=5, maximum=
|
1351 |
elif generation_method == "Image Generation":
|
1352 |
return gr.update(minimum=1, maximum=1, value=1, interactive=False)
|
1353 |
generation_method.change(
|
|
|
27 |
T5EncoderModel, T5Tokenizer)
|
28 |
|
29 |
from cogvideox.data.bucket_sampler import ASPECT_RATIO_512, get_closest_ratio
|
30 |
+
from cogvideox.models.autoencoder_magvit import AutoencoderKLCogVideoX
|
31 |
from cogvideox.models.transformer3d import CogVideoXTransformer3DModel
|
32 |
from cogvideox.pipeline.pipeline_cogvideox import CogVideoX_Fun_Pipeline
|
33 |
from cogvideox.pipeline.pipeline_cogvideox_inpaint import \
|
|
|
1282 |
show_label=False,
|
1283 |
visible=True,
|
1284 |
)
|
1285 |
+
length_slider = gr.Slider(label="Animation length (视频帧数)", value=25, minimum=5, maximum=25, step=4)
|
1286 |
|
1287 |
source_method = gr.Radio(
|
1288 |
["Text to Video (文本到视频)", "Image to Video (图片到视频)", "Video to Video (视频到视频)"],
|
|
|
1347 |
|
1348 |
def upload_generation_method(generation_method):
|
1349 |
if generation_method == "Video Generation":
|
1350 |
+
return gr.update(visible=True, minimum=5, maximum=25, value=25, interactive=True)
|
1351 |
elif generation_method == "Image Generation":
|
1352 |
return gr.update(minimum=1, maximum=1, value=1, interactive=False)
|
1353 |
generation_method.change(
|