linoyts HF staff commited on
Commit
3b56752
·
verified ·
1 Parent(s): e7306de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -19,8 +19,8 @@ DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
19
  pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev",
20
  custom_pipeline="pipeline_flux_rf_inversion",
21
  torch_dtype=torch.bfloat16)
22
- pipe.load_lora_weights(hf_hub_download("ByteDance/Hyper-SD", "Hyper-FLUX.1-dev-8steps-lora.safetensors"), lora_scale=0.125)
23
- pipe.fuse_lora(lora_scale=0.125)
24
  pipe.to(DEVICE)
25
 
26
  examples = [[Image.open("cat.jpg"), "a tiger"]]
@@ -59,9 +59,9 @@ def invert_and_edit(image,
59
 
60
 
61
  output = pipe(prompt,
62
- inverted_latents=inverted_latents,
63
- image_latents=image_latents,
64
- latent_image_ids=latent_image_ids,
65
  start_timestep=start_timestep,
66
  stop_timestep=stop_timestep,
67
  num_inference_steps=num_inversion_steps,
 
19
  pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev",
20
  custom_pipeline="pipeline_flux_rf_inversion",
21
  torch_dtype=torch.bfloat16)
22
+ # pipe.load_lora_weights(hf_hub_download("ByteDance/Hyper-SD", "Hyper-FLUX.1-dev-8steps-lora.safetensors"), lora_scale=0.125)
23
+ # pipe.fuse_lora(lora_scale=0.125)
24
  pipe.to(DEVICE)
25
 
26
  examples = [[Image.open("cat.jpg"), "a tiger"]]
 
59
 
60
 
61
  output = pipe(prompt,
62
+ inverted_latents=inverted_latents.to(DEVICE),
63
+ image_latents=image_latents.to(DEVICE),
64
+ latent_image_ids=latent_image_ids.to(DEVICE),
65
  start_timestep=start_timestep,
66
  stop_timestep=stop_timestep,
67
  num_inference_steps=num_inversion_steps,