Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ for pipe in [text_to_video_pipe, image_to_video_pipe]:
|
|
23 |
MOD_VALUE = 32
|
24 |
DEFAULT_H_SLIDER_VALUE = 896
|
25 |
DEFAULT_W_SLIDER_VALUE = 896
|
26 |
-
NEW_FORMULA_MAX_AREA = 720
|
27 |
SLIDER_MIN_H, SLIDER_MAX_H = 256, 1280
|
28 |
SLIDER_MIN_W, SLIDER_MAX_W = 256, 1280
|
29 |
MAX_SEED = np.iinfo(np.int32).max
|
@@ -77,7 +77,7 @@ def get_duration(input_image, prompt, height, width,
|
|
77 |
return 60
|
78 |
|
79 |
@spaces.GPU(duration=get_duration)
|
80 |
-
def generate_video(input_image, prompt, height, width, negative_prompt=default_negative_prompt, duration_seconds=2, guidance_scale=
|
81 |
target_h = max(MOD_VALUE, (int(height) // MOD_VALUE) * MOD_VALUE)
|
82 |
target_w = max(MOD_VALUE, (int(width) // MOD_VALUE) * MOD_VALUE)
|
83 |
|
@@ -152,7 +152,7 @@ with gr.Blocks() as demo:
|
|
152 |
|
153 |
gr.Examples(
|
154 |
examples=[
|
155 |
-
[None, "A person eating spaghetti", 1024,
|
156 |
["cat.png", "The cat removes the glasses from its eyes.", 1088, 800],
|
157 |
[None, "a penguin playfully dancing in the snow, Antarctica", 1024, 720],
|
158 |
["peng.png", "a penguin running towards camera joyfully, Antarctica", 896, 512],
|
|
|
23 |
MOD_VALUE = 32
|
24 |
DEFAULT_H_SLIDER_VALUE = 896
|
25 |
DEFAULT_W_SLIDER_VALUE = 896
|
26 |
+
NEW_FORMULA_MAX_AREA = 720 * 1024
|
27 |
SLIDER_MIN_H, SLIDER_MAX_H = 256, 1280
|
28 |
SLIDER_MIN_W, SLIDER_MAX_W = 256, 1280
|
29 |
MAX_SEED = np.iinfo(np.int32).max
|
|
|
77 |
return 60
|
78 |
|
79 |
@spaces.GPU(duration=get_duration)
|
80 |
+
def generate_video(input_image, prompt, height, width, negative_prompt=default_negative_prompt, duration_seconds=2, guidance_scale=0, steps=5, seed=42, randomize_seed=False, progress=gr.Progress(track_tqdm=True)):
|
81 |
target_h = max(MOD_VALUE, (int(height) // MOD_VALUE) * MOD_VALUE)
|
82 |
target_w = max(MOD_VALUE, (int(width) // MOD_VALUE) * MOD_VALUE)
|
83 |
|
|
|
152 |
|
153 |
gr.Examples(
|
154 |
examples=[
|
155 |
+
[None, "A person eating spaghetti", 1024, 720],
|
156 |
["cat.png", "The cat removes the glasses from its eyes.", 1088, 800],
|
157 |
[None, "a penguin playfully dancing in the snow, Antarctica", 1024, 720],
|
158 |
["peng.png", "a penguin running towards camera joyfully, Antarctica", 896, 512],
|