Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ from safetensors.torch import load_file
|
|
18 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
19 |
dtype = torch.bfloat16
|
20 |
|
21 |
-
step =
|
22 |
repo = "ByteDance/AnimateDiff-Lightning"
|
23 |
ckpt = f"animatediff_lightning_{step}step_diffusers.safetensors"
|
24 |
#base = "emilianJR/epiCRealism"
|
@@ -87,7 +87,7 @@ def generate_random_string(length):
|
|
87 |
characters = string.ascii_letters + string.digits
|
88 |
return ''.join(random.choice(characters) for _ in range(length))
|
89 |
|
90 |
-
@spaces.GPU(duration=
|
91 |
def Piper(_do):
|
92 |
return pipe(
|
93 |
_do,
|
@@ -162,9 +162,6 @@ with gr.Blocks(theme=gr.themes.Soft(),css=css,js=js) as demo:
|
|
162 |
with gr.Row():
|
163 |
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
164 |
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
165 |
-
with gr.Row():
|
166 |
-
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
167 |
-
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
168 |
|
169 |
def _ret(idx,p1):
|
170 |
print(f'Starting {idx}: {p1}')
|
|
|
18 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
19 |
dtype = torch.bfloat16
|
20 |
|
21 |
+
step = 4
|
22 |
repo = "ByteDance/AnimateDiff-Lightning"
|
23 |
ckpt = f"animatediff_lightning_{step}step_diffusers.safetensors"
|
24 |
#base = "emilianJR/epiCRealism"
|
|
|
87 |
characters = string.ascii_letters + string.digits
|
88 |
return ''.join(random.choice(characters) for _ in range(length))
|
89 |
|
90 |
+
@spaces.GPU(duration=45)
|
91 |
def Piper(_do):
|
92 |
return pipe(
|
93 |
_do,
|
|
|
162 |
with gr.Row():
|
163 |
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
164 |
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
|
|
|
|
|
|
165 |
|
166 |
def _ret(idx,p1):
|
167 |
print(f'Starting {idx}: {p1}')
|