svjack commited on
Commit
3d86592
β€’
1 Parent(s): 47d3ff4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -15,12 +15,13 @@ def init_pipeline():
15
  pipe = FluxPipeline.from_pretrained(
16
  "black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16
17
  )
18
- pipe = pipe.to("cuda")
19
  pipe.load_lora_weights(
20
  "Yuanshi/OminiControl",
21
  weight_name=f"omini/subject_512.safetensors",
22
  adapter_name="subject",
23
  )
 
24
 
25
 
26
  def process_image_and_text(image, text):
 
15
  pipe = FluxPipeline.from_pretrained(
16
  "black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16
17
  )
18
+ #pipe = pipe.to("cuda")
19
  pipe.load_lora_weights(
20
  "Yuanshi/OminiControl",
21
  weight_name=f"omini/subject_512.safetensors",
22
  adapter_name="subject",
23
  )
24
+ pipe.enable_model_cpu_offload()
25
 
26
 
27
  def process_image_and_text(image, text):