SpyC0der77 commited on
Commit
559a127
·
verified ·
1 Parent(s): cf22c32

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -31,6 +31,7 @@ if not path.exists(cache_path):
31
  os.makedirs(cache_path, exist_ok=True)
32
 
33
  pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
 
34
  pipe.load_lora_weights(hf_hub_download("ByteDance/Hyper-SD", "Hyper-FLUX.1-dev-8steps-lora.safetensors"))
35
  pipe.fuse_lora(lora_scale=0.125)
36
  pipe.to(device="cuda", dtype=torch.bfloat16)
 
31
  os.makedirs(cache_path, exist_ok=True)
32
 
33
  pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
34
+ pipe.enable_model_cpu_offload()
35
  pipe.load_lora_weights(hf_hub_download("ByteDance/Hyper-SD", "Hyper-FLUX.1-dev-8steps-lora.safetensors"))
36
  pipe.fuse_lora(lora_scale=0.125)
37
  pipe.to(device="cuda", dtype=torch.bfloat16)