Yaron Koresh commited on
Commit
d0e1e34
·
verified ·
1 Parent(s): 6304c91

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -12
app.py CHANGED
@@ -206,23 +206,22 @@ def main():
206
 
207
  progress=gr.Progress()
208
 
209
- base = "black-forest-labs/FLUX.1-dev"
210
- #base="SG161222/Realistic_Vision_V6.0_B1_noVAE"
211
- #vae="stabilityai/sd-vae-ft-mse-original"
212
- #repo = "ByteDance/SDXL-Lightning"
213
- #ckpt = f"sdxl_lightning_{step}step_unet.safetensors"
214
-
215
- #unet = UNet2DConditionModel.from_config(base, subfolder="unet").to(device)
216
- #unet.load_state_dict(load_file(hf_hub_download(repo, ckpt), device=device), strict=False)
217
-
218
- #base = "emilianJR/epiCRealism"
219
  repo = "ByteDance/AnimateDiff-Lightning"
220
  ckpt = f"animatediff_lightning_{step}step_diffusers.safetensors"
221
-
 
 
 
 
222
  pipe = AnimateDiffPipeline.from_pretrained(base, torch_dtype=dtype, token=os.getenv("hf_token")).to(device)
223
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", beta_schedule="linear")
224
  pipe.unet.load_state_dict(load_file(hf_hub_download(repo, ckpt), device=device), strict=False)
225
-
 
226
  mp.set_start_method("spawn", force=True)
227
 
228
  with gr.Blocks(theme=gr.themes.Soft(),css=css,js=js) as demo:
 
206
 
207
  progress=gr.Progress()
208
 
209
+ repo="stabilityai/sd-vae-ft-mse-original"
210
+ ckpt="vae-ft-mse-840000-ema-pruned.safetensors"
211
+ vae = load_file(hf_hub_download(repo, ckpt), device=device)
212
+
 
 
 
 
 
 
213
  repo = "ByteDance/AnimateDiff-Lightning"
214
  ckpt = f"animatediff_lightning_{step}step_diffusers.safetensors"
215
+
216
+ #base = "SG161222/Realistic_Vision_V6.0_B1_noVAE"
217
+ #base = "emilianJR/epiCRealism"
218
+ base = "black-forest-labs/FLUX.1-schnell"
219
+
220
  pipe = AnimateDiffPipeline.from_pretrained(base, torch_dtype=dtype, token=os.getenv("hf_token")).to(device)
221
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", beta_schedule="linear")
222
  pipe.unet.load_state_dict(load_file(hf_hub_download(repo, ckpt), device=device), strict=False)
223
+ pipe.enable_free_init(method="butterworth", use_fast_sampling=False)
224
+
225
  mp.set_start_method("spawn", force=True)
226
 
227
  with gr.Blocks(theme=gr.themes.Soft(),css=css,js=js) as demo: