DeepBeepMeep commited on
Commit ·
d40f8bc
1
Parent(s): 948696e
fixed bug with i2v introduced in last release
Browse files- gradio_server.py +9 -11
gradio_server.py
CHANGED
|
@@ -57,12 +57,12 @@ def _parse_args():
|
|
| 57 |
)
|
| 58 |
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
|
| 67 |
|
| 68 |
parser.add_argument(
|
|
@@ -236,11 +236,9 @@ if args.t2v:
|
|
| 236 |
if args.i2v:
|
| 237 |
use_image2video = True
|
| 238 |
|
| 239 |
-
# if use_image2video:
|
| 240 |
-
# lora_dir =args.lora_dir_i2v
|
| 241 |
-
# lora_preselected_preset = args.lora_preset_i2v
|
| 242 |
-
# else:
|
| 243 |
lora_dir =args.lora_dir
|
|
|
|
|
|
|
| 244 |
if len(lora_dir) ==0:
|
| 245 |
lora_dir = "loras_i2v" if use_image2video else "loras"
|
| 246 |
lora_preselected_preset = args.lora_preset
|
|
@@ -1248,7 +1246,7 @@ def create_demo():
|
|
| 1248 |
label="Images as a starting point for new videos", type ="pil", #file_types= "image",
|
| 1249 |
columns=[3], rows=[1], object_fit="contain", height="auto", selected_index=0, interactive= True, visible=use_image2video)
|
| 1250 |
else:
|
| 1251 |
-
image_to_continue = gr.Image(label= "Image as a starting point for a new video", visible=use_image2video)
|
| 1252 |
|
| 1253 |
prompt = gr.Textbox(label="Prompts (multiple prompts separated by carriage returns will generate multiple videos, lines that starts with # are ignored)", value=default_prompt, lines=3)
|
| 1254 |
|
|
|
|
| 57 |
)
|
| 58 |
|
| 59 |
|
| 60 |
+
parser.add_argument(
|
| 61 |
+
"--lora-dir-i2v",
|
| 62 |
+
type=str,
|
| 63 |
+
default="loras_i2v",
|
| 64 |
+
help="Path to a directory that contains Loras for i2v"
|
| 65 |
+
)
|
| 66 |
|
| 67 |
|
| 68 |
parser.add_argument(
|
|
|
|
| 236 |
if args.i2v:
|
| 237 |
use_image2video = True
|
| 238 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 239 |
lora_dir =args.lora_dir
|
| 240 |
+
if use_image2video and len(lora_dir)==0:
|
| 241 |
+
lora_dir =args.lora_dir_i2v
|
| 242 |
if len(lora_dir) ==0:
|
| 243 |
lora_dir = "loras_i2v" if use_image2video else "loras"
|
| 244 |
lora_preselected_preset = args.lora_preset
|
|
|
|
| 1246 |
label="Images as a starting point for new videos", type ="pil", #file_types= "image",
|
| 1247 |
columns=[3], rows=[1], object_fit="contain", height="auto", selected_index=0, interactive= True, visible=use_image2video)
|
| 1248 |
else:
|
| 1249 |
+
image_to_continue = gr.Image(label= "Image as a starting point for a new video", type ="pil", visible=use_image2video)
|
| 1250 |
|
| 1251 |
prompt = gr.Textbox(label="Prompts (multiple prompts separated by carriage returns will generate multiple videos, lines that starts with # are ignored)", value=default_prompt, lines=3)
|
| 1252 |
|