Yaron Koresh commited on
Commit
884df9d
·
verified ·
1 Parent(s): 5f9fc17

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -206,13 +206,12 @@ def main():
206
 
207
  adapter = MotionAdapter.from_pretrained("guoyww/animatediff-motion-adapter-v1-5-2")
208
  vae = AutoencoderKL.from_single_file("https://huggingface.co/stabilityai/sd-vae-ft-mse-original/vae-ft-mse-840000-ema-pruned.safetensors")
209
- unet = UNet3DConditionModel().to(device, dtype).load_state_dict(load_file(hf_hub_download("ByteDance/SDXL-Lightning", f"sdxl_lightning_{step}step_unet.safetensors"), device=device), strict=False)
210
 
211
  repo = "ByteDance/AnimateDiff-Lightning"
212
  ckpt = f"animatediff_lightning_{step}step_diffusers.safetensors"
213
  base = "black-forest-labs/FLUX.1-schnell"
214
  #base = "SG161222/Realistic_Vision_V6.0_B1_noVAE"
215
- #base = "emilianJR/epiCRealism"
216
 
217
  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)
218
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", beta_schedule="linear")
 
206
 
207
  adapter = MotionAdapter.from_pretrained("guoyww/animatediff-motion-adapter-v1-5-2")
208
  vae = AutoencoderKL.from_single_file("https://huggingface.co/stabilityai/sd-vae-ft-mse-original/vae-ft-mse-840000-ema-pruned.safetensors")
209
+ unet = UNet3DConditionModel().to(device, dtype).load_state_dict(load_file(hf_hub_download("emilianJR/epiCRealism", "unet/diffusion_pytorch_model.safetensors"), device=device), strict=False)
210
 
211
  repo = "ByteDance/AnimateDiff-Lightning"
212
  ckpt = f"animatediff_lightning_{step}step_diffusers.safetensors"
213
  base = "black-forest-labs/FLUX.1-schnell"
214
  #base = "SG161222/Realistic_Vision_V6.0_B1_noVAE"
 
215
 
216
  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)
217
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", beta_schedule="linear")