Muhammad Taqi Raza
commited on
Commit
·
25b750a
1
Parent(s):
137b829
change output
Browse files- gradio_app.py +7 -3
- inference/cli_demo_camera_i2v_pcd.py +2 -2
gradio_app.py
CHANGED
@@ -133,10 +133,14 @@ def inference(
|
|
133 |
"--vae_channels", str(vae_channels),
|
134 |
"--controlnet_input_channels", str(controlnet_input_channels),
|
135 |
"--controlnet_transformer_num_layers", str(controlnet_transformer_num_layers),
|
136 |
-
"--upscale",
|
137 |
-
"--upscale_factor", str(upscale_factor),
|
138 |
-
"--refine",
|
139 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
try:
|
141 |
result = subprocess.run(command, capture_output=True, text=True, check=True)
|
142 |
logs = result.stdout
|
|
|
133 |
"--vae_channels", str(vae_channels),
|
134 |
"--controlnet_input_channels", str(controlnet_input_channels),
|
135 |
"--controlnet_transformer_num_layers", str(controlnet_transformer_num_layers),
|
|
|
|
|
|
|
136 |
]
|
137 |
+
# Conditionally append optional flags
|
138 |
+
if upscale:
|
139 |
+
command.extend(["--upscale", "--upscale_factor", str(upscale_factor)])
|
140 |
+
|
141 |
+
if refine:
|
142 |
+
command.append("--refine")
|
143 |
+
|
144 |
try:
|
145 |
result = subprocess.run(command, capture_output=True, text=True, check=True)
|
146 |
logs = result.stdout
|
inference/cli_demo_camera_i2v_pcd.py
CHANGED
@@ -174,9 +174,9 @@ def generate_video(
|
|
174 |
pool_style: str = 'avg',
|
175 |
pipe_cpu_offload: bool = False,
|
176 |
fps: int = 8,
|
177 |
-
upscale: bool =
|
178 |
upscale_factor: int = 4,
|
179 |
-
refine: bool =
|
180 |
):
|
181 |
"""
|
182 |
Generates a video based on the given prompt and saves it to the specified path.
|
|
|
174 |
pool_style: str = 'avg',
|
175 |
pipe_cpu_offload: bool = False,
|
176 |
fps: int = 8,
|
177 |
+
upscale: bool = False,
|
178 |
upscale_factor: int = 4,
|
179 |
+
refine: bool = False,
|
180 |
):
|
181 |
"""
|
182 |
Generates a video based on the given prompt and saves it to the specified path.
|