Spaces:
Paused
Paused
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,17 +23,17 @@ import jax
|
|
| 23 |
import jax.numpy as jnp
|
| 24 |
|
| 25 |
last_motion=None
|
| 26 |
-
fps=
|
| 27 |
time=3
|
| 28 |
-
width=
|
| 29 |
-
height=
|
| 30 |
device = "cuda"
|
| 31 |
dtype = torch.float16
|
| 32 |
result=[]
|
| 33 |
-
step =
|
| 34 |
accu=7.5
|
| 35 |
-
repo = "ByteDance/AnimateDiff-Lightning"
|
| 36 |
-
ckpt = f"animatediff_lightning_{step}step_diffusers.safetensors"
|
| 37 |
#base = "emilianJR/epiCRealism"
|
| 38 |
base = "SG161222/Realistic_Vision_V6.0_B1_noVAE"
|
| 39 |
vae = AutoencoderKL.from_pretrained("stabilityai/sd-vae-ft-mse").to(device, dtype=dtype)
|
|
@@ -135,8 +135,6 @@ def Piper(image,positive,negative,motion):
|
|
| 135 |
global last_motion
|
| 136 |
global ip_loaded
|
| 137 |
|
| 138 |
-
#pipe.unet.load_state_dict(load_file(hf_hub_download(repo, ckpt), device=device), strict=False)
|
| 139 |
-
|
| 140 |
if last_motion != motion:
|
| 141 |
pipe.unload_lora_weights()
|
| 142 |
if motion != "":
|
|
@@ -203,10 +201,10 @@ pipe.scheduler = DDIMScheduler(
|
|
| 203 |
timestep_spacing="trailing",
|
| 204 |
steps_offset=1
|
| 205 |
)
|
| 206 |
-
pipe.unet.load_state_dict(load_file(hf_hub_download(repo, ckpt), device=device), strict=False)
|
| 207 |
pipe.load_ip_adapter("h94/IP-Adapter", subfolder="models", weight_name="ip-adapter_sd15.bin")
|
| 208 |
pipe.enable_vae_slicing()
|
| 209 |
-
pipe.enable_free_init(method="butterworth", use_fast_sampling=
|
| 210 |
|
| 211 |
mp.set_start_method("spawn", force=True)
|
| 212 |
|
|
|
|
| 23 |
import jax.numpy as jnp
|
| 24 |
|
| 25 |
last_motion=None
|
| 26 |
+
fps=15
|
| 27 |
time=3
|
| 28 |
+
width=576
|
| 29 |
+
height=1024
|
| 30 |
device = "cuda"
|
| 31 |
dtype = torch.float16
|
| 32 |
result=[]
|
| 33 |
+
step = 4
|
| 34 |
accu=7.5
|
| 35 |
+
#repo = "ByteDance/AnimateDiff-Lightning"
|
| 36 |
+
#ckpt = f"animatediff_lightning_{step}step_diffusers.safetensors"
|
| 37 |
#base = "emilianJR/epiCRealism"
|
| 38 |
base = "SG161222/Realistic_Vision_V6.0_B1_noVAE"
|
| 39 |
vae = AutoencoderKL.from_pretrained("stabilityai/sd-vae-ft-mse").to(device, dtype=dtype)
|
|
|
|
| 135 |
global last_motion
|
| 136 |
global ip_loaded
|
| 137 |
|
|
|
|
|
|
|
| 138 |
if last_motion != motion:
|
| 139 |
pipe.unload_lora_weights()
|
| 140 |
if motion != "":
|
|
|
|
| 201 |
timestep_spacing="trailing",
|
| 202 |
steps_offset=1
|
| 203 |
)
|
| 204 |
+
#pipe.unet.load_state_dict(load_file(hf_hub_download(repo, ckpt), device=device), strict=False)
|
| 205 |
pipe.load_ip_adapter("h94/IP-Adapter", subfolder="models", weight_name="ip-adapter_sd15.bin")
|
| 206 |
pipe.enable_vae_slicing()
|
| 207 |
+
pipe.enable_free_init(method="butterworth", use_fast_sampling=True)
|
| 208 |
|
| 209 |
mp.set_start_method("spawn", force=True)
|
| 210 |
|