Spaces:
Running
Running
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -189,17 +189,17 @@ def run(m,p1,p2,*result):
|
|
189 |
|
190 |
adapter = MotionAdapter.from_pretrained("guoyww/animatediff-motion-adapter-v1-5-3")
|
191 |
vae = AutoencoderKL.from_single_file("https://huggingface.co/stabilityai/sd-vae-ft-mse-original/vae-ft-mse-840000-ema-pruned.safetensors")
|
192 |
-
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)
|
193 |
|
194 |
repo = "ByteDance/AnimateDiff-Lightning"
|
195 |
ckpt = f"animatediff_lightning_{step}step_diffusers.safetensors"
|
196 |
-
base = "
|
197 |
#base = "SG161222/Realistic_Vision_V6.0_B1_noVAE"
|
198 |
|
199 |
pipe = AnimateDiffPipeline.from_pretrained(base, vae=vae, motion_adapter=adapter, feature_extractor=None, image_encoder=None, unet=unet, torch_dtype=dtype, token=os.getenv("hf_token")).to(device)
|
200 |
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", beta_schedule="linear")
|
201 |
pipe.unet.load_state_dict(load_file(hf_hub_download(repo, ckpt), device=device), strict=False)
|
202 |
-
pipe.enable_free_init(method="butterworth", use_fast_sampling=
|
203 |
|
204 |
mp.set_start_method("spawn", force=True)
|
205 |
|
|
|
189 |
|
190 |
adapter = MotionAdapter.from_pretrained("guoyww/animatediff-motion-adapter-v1-5-3")
|
191 |
vae = AutoencoderKL.from_single_file("https://huggingface.co/stabilityai/sd-vae-ft-mse-original/vae-ft-mse-840000-ema-pruned.safetensors")
|
192 |
+
#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)
|
193 |
|
194 |
repo = "ByteDance/AnimateDiff-Lightning"
|
195 |
ckpt = f"animatediff_lightning_{step}step_diffusers.safetensors"
|
196 |
+
base = "emilianJR/epiCRealism"
|
197 |
#base = "SG161222/Realistic_Vision_V6.0_B1_noVAE"
|
198 |
|
199 |
pipe = AnimateDiffPipeline.from_pretrained(base, vae=vae, motion_adapter=adapter, feature_extractor=None, image_encoder=None, unet=unet, torch_dtype=dtype, token=os.getenv("hf_token")).to(device)
|
200 |
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", beta_schedule="linear")
|
201 |
pipe.unet.load_state_dict(load_file(hf_hub_download(repo, ckpt), device=device), strict=False)
|
202 |
+
pipe.enable_free_init(method="butterworth", use_fast_sampling=False)
|
203 |
|
204 |
mp.set_start_method("spawn", force=True)
|
205 |
|