Update gradio_app.py
Browse files- gradio_app.py +7 -4
gradio_app.py
CHANGED
@@ -125,10 +125,11 @@ def untranspose(tensor):
|
|
125 |
ndim = tensor.ndim
|
126 |
return tensor.transpose(ndim-1, ndim-2)
|
127 |
|
|
|
128 |
@spaces.GPU(duration=200)
|
129 |
-
def get_image(
|
130 |
-
unconditional_guidance_scale=1.0, cfg_img=None,
|
131 |
-
|
132 |
|
133 |
seed_everything(seed)
|
134 |
# image1 = Image.open(file_list[2*idx]).convert('RGB')
|
@@ -313,7 +314,9 @@ def dynamicrafter_demo(result_dir='./tmp/', res=1024):
|
|
313 |
# fn = get_image,
|
314 |
# cache_examples=False,
|
315 |
# )
|
316 |
-
|
|
|
|
|
317 |
outputs=[i2v_output_video],
|
318 |
fn = get_image
|
319 |
)
|
|
|
125 |
ndim = tensor.ndim
|
126 |
return tensor.transpose(ndim-1, ndim-2)
|
127 |
|
128 |
+
[i2v_input_image, i2v_input_text, i2v_input_image, i2v_input_image2, i2v_steps, i2v_eta, i2v_motion, i2v_seed],
|
129 |
@spaces.GPU(duration=200)
|
130 |
+
def get_image(image1, prompt, image2, dim_steps=50, ddim_eta=1., fs=None, seed=123, \
|
131 |
+
unconditional_guidance_scale=1.0, cfg_img=None, text_input=False, multiple_cond_cfg=False, \
|
132 |
+
loop=False, interp=False, timestep_spacing='uniform', guidance_rescale=0.0, noise_shape, n_samples=1, **kwargs):
|
133 |
|
134 |
seed_everything(seed)
|
135 |
# image1 = Image.open(file_list[2*idx]).convert('RGB')
|
|
|
314 |
# fn = get_image,
|
315 |
# cache_examples=False,
|
316 |
# )
|
317 |
+
img_size = [72, 108]
|
318 |
+
|
319 |
+
i2v_end_btn.click(inputs=[i2v_input_image, i2v_input_text, i2v_input_image2, i2v_steps, i2v_eta, i2v_motion, i2v_seed],
|
320 |
outputs=[i2v_output_video],
|
321 |
fn = get_image
|
322 |
)
|