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