Spaces:
Running
Running
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -41,10 +41,10 @@ root.addHandler(handler)
|
|
41 |
|
42 |
if torch.cuda.is_available():
|
43 |
device = "cuda"
|
44 |
-
dtype = torch.
|
45 |
else:
|
46 |
device = "cpu"
|
47 |
-
dtype = torch.
|
48 |
|
49 |
base = "SG161222/Realistic_Vision_V6.0_B1_noVAE"
|
50 |
adapter = MotionAdapter.from_pretrained("guoyww/animatediff-motion-adapter-v1-5-3", torch_dtype=dtype, device=device)
|
@@ -56,12 +56,12 @@ last_motion=""
|
|
56 |
# precision data
|
57 |
|
58 |
seq=512
|
59 |
-
fast=
|
60 |
-
fps=
|
61 |
width=896
|
62 |
height=896
|
63 |
-
step=
|
64 |
-
accu=
|
65 |
|
66 |
# ui data
|
67 |
|
@@ -185,7 +185,7 @@ def pipe_generate(img,p1,p2,motion,time,title):
|
|
185 |
num_inference_steps=step,
|
186 |
max_sequence_length=seq,
|
187 |
need_safetycheck=False,
|
188 |
-
generator=torch.Generator(device)
|
189 |
).images[0]
|
190 |
|
191 |
if time == 0.0:
|
|
|
41 |
|
42 |
if torch.cuda.is_available():
|
43 |
device = "cuda"
|
44 |
+
dtype = torch.float16
|
45 |
else:
|
46 |
device = "cpu"
|
47 |
+
dtype = torch.float16
|
48 |
|
49 |
base = "SG161222/Realistic_Vision_V6.0_B1_noVAE"
|
50 |
adapter = MotionAdapter.from_pretrained("guoyww/animatediff-motion-adapter-v1-5-3", torch_dtype=dtype, device=device)
|
|
|
56 |
# precision data
|
57 |
|
58 |
seq=512
|
59 |
+
fast=True
|
60 |
+
fps=30
|
61 |
width=896
|
62 |
height=896
|
63 |
+
step=200
|
64 |
+
accu=5.0
|
65 |
|
66 |
# ui data
|
67 |
|
|
|
185 |
num_inference_steps=step,
|
186 |
max_sequence_length=seq,
|
187 |
need_safetycheck=False,
|
188 |
+
generator=torch.Generator(device)
|
189 |
).images[0]
|
190 |
|
191 |
if time == 0.0:
|