Commit
•
7da1ebd
1
Parent(s):
220d1de
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ bases = {
|
|
16 |
"epiCRealism": "emilianJR/epiCRealism"
|
17 |
}
|
18 |
step_loaded = None
|
19 |
-
base_loaded = "
|
20 |
motion_loaded = None
|
21 |
|
22 |
# Ensure model and scheduler are initialized in GPU-enabled function
|
@@ -69,7 +69,15 @@ def generate_image(prompt, base, motion, step, progress=gr.Progress()):
|
|
69 |
def progress_callback(i, t, z):
|
70 |
progress((i+1, step))
|
71 |
|
72 |
-
output = pipe(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
has_nsfw_concepts = check_nsfw_images([output.frames[0][0]])
|
75 |
if has_nsfw_concepts[0]:
|
@@ -137,8 +145,8 @@ with gr.Blocks(css="style.css") as demo:
|
|
137 |
video = gr.Video(
|
138 |
label='AnimateDiff-Lightning',
|
139 |
autoplay=True,
|
140 |
-
height=
|
141 |
-
width=
|
142 |
elem_id="video_output"
|
143 |
)
|
144 |
|
|
|
16 |
"epiCRealism": "emilianJR/epiCRealism"
|
17 |
}
|
18 |
step_loaded = None
|
19 |
+
base_loaded = "epiCRealism"
|
20 |
motion_loaded = None
|
21 |
|
22 |
# Ensure model and scheduler are initialized in GPU-enabled function
|
|
|
69 |
def progress_callback(i, t, z):
|
70 |
progress((i+1, step))
|
71 |
|
72 |
+
output = pipe(
|
73 |
+
prompt=prompt,
|
74 |
+
width=1024,
|
75 |
+
height=576,
|
76 |
+
guidance_scale=1.0,
|
77 |
+
num_inference_steps=step,
|
78 |
+
callback=progress_callback,
|
79 |
+
callback_steps=1
|
80 |
+
)
|
81 |
|
82 |
has_nsfw_concepts = check_nsfw_images([output.frames[0][0]])
|
83 |
if has_nsfw_concepts[0]:
|
|
|
145 |
video = gr.Video(
|
146 |
label='AnimateDiff-Lightning',
|
147 |
autoplay=True,
|
148 |
+
height=1024,
|
149 |
+
width=576,
|
150 |
elem_id="video_output"
|
151 |
)
|
152 |
|