Spaces:
Running
Running
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -168,33 +168,33 @@ def calc():
|
|
168 |
|
169 |
x = grid(1)
|
170 |
|
171 |
-
if last_motion != inp[
|
172 |
pipe.unload_lora_weights()
|
173 |
-
if inp[
|
174 |
-
pipe.load_lora_weights(inp[
|
175 |
pipe.fuse_lora()
|
176 |
-
pipe.set_adapters([
|
177 |
-
last_motion = inp[
|
178 |
|
179 |
pipe.to(device,dtype)
|
180 |
|
181 |
-
if inp[
|
182 |
out[x] = pipe(
|
183 |
-
prompt=inp[
|
184 |
height=height,
|
185 |
width=width,
|
186 |
-
ip_adapter_image=inp[
|
187 |
num_inference_steps=step,
|
188 |
guidance_scale=accu,
|
189 |
num_frames=(fps*time)
|
190 |
)
|
191 |
|
192 |
out[x] = pipe(
|
193 |
-
prompt=inp[
|
194 |
-
negative_prompt=inp[
|
195 |
height=height,
|
196 |
width=width,
|
197 |
-
ip_adapter_image=inp[
|
198 |
num_inference_steps=step,
|
199 |
guidance_scale=accu,
|
200 |
num_frames=(fps*time)
|
|
|
168 |
|
169 |
x = grid(1)
|
170 |
|
171 |
+
if last_motion != inp[3]:
|
172 |
pipe.unload_lora_weights()
|
173 |
+
if inp[3] != "":
|
174 |
+
pipe.load_lora_weights(inp[3], adapter_name="motion")
|
175 |
pipe.fuse_lora()
|
176 |
+
pipe.set_adapters([3], [0.7])
|
177 |
+
last_motion = inp[3]
|
178 |
|
179 |
pipe.to(device,dtype)
|
180 |
|
181 |
+
if inp[2]=="":
|
182 |
out[x] = pipe(
|
183 |
+
prompt=inp[1],
|
184 |
height=height,
|
185 |
width=width,
|
186 |
+
ip_adapter_image=inp[0].convert("RGB").resize((width,height)),
|
187 |
num_inference_steps=step,
|
188 |
guidance_scale=accu,
|
189 |
num_frames=(fps*time)
|
190 |
)
|
191 |
|
192 |
out[x] = pipe(
|
193 |
+
prompt=inp[1],
|
194 |
+
negative_prompt=inp[2],
|
195 |
height=height,
|
196 |
width=width,
|
197 |
+
ip_adapter_image=inp[0].convert("RGB").resize((width,height)),
|
198 |
num_inference_steps=step,
|
199 |
guidance_scale=accu,
|
200 |
num_frames=(fps*time)
|