Spaces:
Running
on
Zero
Running
on
Zero
This PR adds an example
#19
by
Fabrice-TIERCELIN
- opened
- .gitattributes +2 -0
- app.py +28 -0
- examples/Example1.png +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
Example1.png filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
examples/Example1.png filter=lfs diff=lfs merge=lfs -text
|
app.py
CHANGED
|
@@ -387,6 +387,34 @@ with gr.Blocks(css=css) as demo:
|
|
| 387 |
height_input = gr.Slider(label="Height", value=512, step=32, minimum=MIN_DIM_SLIDER, maximum=MAX_IMAGE_SIZE, info="Must be divisible by 32.")
|
| 388 |
width_input = gr.Slider(label="Width", value=704, step=32, minimum=MIN_DIM_SLIDER, maximum=MAX_IMAGE_SIZE, info="Must be divisible by 32.")
|
| 389 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 390 |
|
| 391 |
# --- Event handlers for updating dimensions on upload ---
|
| 392 |
def handle_image_upload_for_dims(image_filepath, current_h, current_w):
|
|
|
|
| 387 |
height_input = gr.Slider(label="Height", value=512, step=32, minimum=MIN_DIM_SLIDER, maximum=MAX_IMAGE_SIZE, info="Must be divisible by 32.")
|
| 388 |
width_input = gr.Slider(label="Width", value=704, step=32, minimum=MIN_DIM_SLIDER, maximum=MAX_IMAGE_SIZE, info="Must be divisible by 32.")
|
| 389 |
|
| 390 |
+
gr.Examples(
|
| 391 |
+
examples = [
|
| 392 |
+
[
|
| 393 |
+
"View of the sea as far as the eye can see, from the seaside, a piece of land is barely visible on the horizon at the middle, the sky is radiant, reflections of the sun in the water, photorealistic, realistic, intricate details, 8k, insanely detailed",
|
| 394 |
+
"",
|
| 395 |
+
"./examples/Example1.png",
|
| 396 |
+
None,
|
| 397 |
+
512,
|
| 398 |
+
704,
|
| 399 |
+
"image-to-video",
|
| 400 |
+
6,
|
| 401 |
+
9,
|
| 402 |
+
42,
|
| 403 |
+
True,
|
| 404 |
+
1,
|
| 405 |
+
True
|
| 406 |
+
],
|
| 407 |
+
],
|
| 408 |
+
run_on_click = True,
|
| 409 |
+
fn = generate,
|
| 410 |
+
inputs = [i2v_prompt, negative_prompt_input, image_i2v, video_i_hidden,
|
| 411 |
+
height_input, width_input, mode,
|
| 412 |
+
duration_input, frames_to_use,
|
| 413 |
+
seed_input, randomize_seed_input, guidance_scale_input, improve_texture],
|
| 414 |
+
outputs = [output_video, seed_input],
|
| 415 |
+
cache_examples = True,
|
| 416 |
+
)
|
| 417 |
+
|
| 418 |
|
| 419 |
# --- Event handlers for updating dimensions on upload ---
|
| 420 |
def handle_image_upload_for_dims(image_filepath, current_h, current_w):
|
examples/Example1.png
ADDED
|
Git LFS Details
|