Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -48,12 +48,7 @@ root.addHandler(handler2)
|
|
48 |
|
49 |
dtype = torch.float16
|
50 |
device = "cuda"
|
51 |
-
#repo = "ByteDance/AnimateDiff-Lightning"
|
52 |
-
#ckpt = f"animatediff_lightning_{step}step_diffusers.safetensors"
|
53 |
-
#base = "emilianJR/epiCRealism"
|
54 |
base = "SG161222/Realistic_Vision_V6.0_B1_noVAE"
|
55 |
-
#vae = AutoencoderKL.from_pretrained("stabilityai/sd-vae-ft-mse").to(device, dtype=dtype)
|
56 |
-
#unet = UNet2DConditionModel.from_config("emilianJR/epiCRealism",subfolder="unet").to(device, dtype).load_state_dict(load_file(hf_hub_download("emilianJR/epiCRealism", "unet/diffusion_pytorch_model.safetensors"), device=device), strict=False)
|
57 |
adapter = MotionAdapter.from_pretrained("guoyww/animatediff-motion-adapter-v1-5-3", torch_dtype=dtype, device=device)
|
58 |
|
59 |
# variable data
|
@@ -64,13 +59,13 @@ result = []
|
|
64 |
# precision data
|
65 |
|
66 |
seq=512
|
67 |
-
fast=
|
68 |
-
fps=
|
69 |
time=1
|
70 |
width=896
|
71 |
height=896
|
72 |
-
step=
|
73 |
-
accu=
|
74 |
|
75 |
# ui data
|
76 |
|
@@ -126,7 +121,6 @@ pipe.scheduler = DDIMScheduler(
|
|
126 |
timestep_spacing="trailing",
|
127 |
steps_offset=1
|
128 |
)
|
129 |
-
#pipe.unet.load_state_dict(load_file(hf_hub_download(repo, ckpt), device=device), strict=False)
|
130 |
pipe.load_ip_adapter("h94/IP-Adapter", subfolder="models", weight_name="ip-adapter-plus_sd15.bin")
|
131 |
pipe.enable_free_init(method="butterworth", use_fast_sampling=fast)
|
132 |
|
|
|
48 |
|
49 |
dtype = torch.float16
|
50 |
device = "cuda"
|
|
|
|
|
|
|
51 |
base = "SG161222/Realistic_Vision_V6.0_B1_noVAE"
|
|
|
|
|
52 |
adapter = MotionAdapter.from_pretrained("guoyww/animatediff-motion-adapter-v1-5-3", torch_dtype=dtype, device=device)
|
53 |
|
54 |
# variable data
|
|
|
59 |
# precision data
|
60 |
|
61 |
seq=512
|
62 |
+
fast=True
|
63 |
+
fps=20
|
64 |
time=1
|
65 |
width=896
|
66 |
height=896
|
67 |
+
step=40
|
68 |
+
accu=8.5
|
69 |
|
70 |
# ui data
|
71 |
|
|
|
121 |
timestep_spacing="trailing",
|
122 |
steps_offset=1
|
123 |
)
|
|
|
124 |
pipe.load_ip_adapter("h94/IP-Adapter", subfolder="models", weight_name="ip-adapter-plus_sd15.bin")
|
125 |
pipe.enable_free_init(method="butterworth", use_fast_sampling=fast)
|
126 |
|