Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -23,12 +23,12 @@ import jax
|
|
23 |
import jax.numpy as jnp
|
24 |
|
25 |
last_motion=None
|
26 |
-
fps=
|
27 |
-
time=
|
28 |
device = "cuda"
|
29 |
dtype = torch.float16
|
30 |
result=[]
|
31 |
-
step =
|
32 |
|
33 |
css="""
|
34 |
input, input::placeholder {
|
@@ -189,10 +189,9 @@ ckpt = f"animatediff_lightning_{step}step_diffusers.safetensors"
|
|
189 |
base = "emilianJR/epiCRealism"
|
190 |
#base = "SG161222/Realistic_Vision_V6.0_B1_noVAE"
|
191 |
|
192 |
-
|
193 |
-
adapter.load_state_dict(load_file(hf_hub_download(repo ,ckpt), device=device))
|
194 |
-
pipe = AnimateDiffPipeline.from_pretrained(base, motion_adapter=adapter, torch_dtype=dtype).to(device)
|
195 |
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", beta_schedule="linear")
|
|
|
196 |
pipe.enable_free_init(method="butterworth", use_fast_sampling=False)
|
197 |
|
198 |
mp.set_start_method("spawn", force=True)
|
|
|
23 |
import jax.numpy as jnp
|
24 |
|
25 |
last_motion=None
|
26 |
+
fps=15
|
27 |
+
time=1
|
28 |
device = "cuda"
|
29 |
dtype = torch.float16
|
30 |
result=[]
|
31 |
+
step = 2
|
32 |
|
33 |
css="""
|
34 |
input, input::placeholder {
|
|
|
189 |
base = "emilianJR/epiCRealism"
|
190 |
#base = "SG161222/Realistic_Vision_V6.0_B1_noVAE"
|
191 |
|
192 |
+
pipe = AnimateDiffPipeline.from_pretrained(bases[base_loaded], torch_dtype=dtype).to(device)
|
|
|
|
|
193 |
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", beta_schedule="linear")
|
194 |
+
pipe.unet.load_state_dict(load_file(hf_hub_download(repo, ckpt), device=device), strict=False)
|
195 |
pipe.enable_free_init(method="butterworth", use_fast_sampling=False)
|
196 |
|
197 |
mp.set_start_method("spawn", force=True)
|