Spaces:
Runtime error
Runtime error
Update ominicontrol.py
Browse files- 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,
|