svjack commited on
Commit
be24052
·
verified ·
1 Parent(s): e988c07

Update ominicontrol.py

Browse files
Files changed (1) hide show
  1. ominicontrol.py +3 -1
ominicontrol.py CHANGED
@@ -12,7 +12,7 @@ print("Loading model...")
12
  pipe = FluxPipeline.from_pretrained(
13
  "black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16
14
  )
15
- pipe = pipe.to("cuda")
16
 
17
  pipe.unload_lora_weights()
18
 
@@ -37,6 +37,8 @@ pipe.load_lora_weights(
37
  adapter_name="snoopy",
38
  )
39
 
 
 
40
 
41
  def generate_image(
42
  image,
 
12
  pipe = FluxPipeline.from_pretrained(
13
  "black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16
14
  )
15
+ #pipe = pipe.to("cuda")
16
 
17
  pipe.unload_lora_weights()
18
 
 
37
  adapter_name="snoopy",
38
  )
39
 
40
+ pipe.enable_sequential_cpu_offload()
41
+
42
 
43
  def generate_image(
44
  image,