Spaces:
Running
on
Zero
Running
on
Zero
Update src/flux/pipeline_tools.py
Browse files
src/flux/pipeline_tools.py
CHANGED
@@ -513,9 +513,7 @@ class CustomFluxPipeline:
|
|
513 |
model_path = os.getenv("FLUX_MODEL_PATH", "black-forest-labs/FLUX.1-dev")
|
514 |
print("[CustomFluxPipeline] Loading FLUX Pipeline")
|
515 |
self.pipe = FluxPipeline.from_pretrained(model_path, torch_dtype=torch_dtype).to(device)
|
516 |
-
|
517 |
-
# self.pipe.vae = self.pipe.vae.to(device, dtype=torch_dtype)
|
518 |
-
# self.pipe.transformer = self.pipe.transformer.to(device, dtype=torch_dtype)
|
519 |
|
520 |
self.config = config
|
521 |
self.device = device
|
|
|
513 |
model_path = os.getenv("FLUX_MODEL_PATH", "black-forest-labs/FLUX.1-dev")
|
514 |
print("[CustomFluxPipeline] Loading FLUX Pipeline")
|
515 |
self.pipe = FluxPipeline.from_pretrained(model_path, torch_dtype=torch_dtype).to(device)
|
516 |
+
self.pipe.enable_sequential_cpu_offload()
|
|
|
|
|
517 |
|
518 |
self.config = config
|
519 |
self.device = device
|