Spaces:
Runtime error
Runtime error
Commit
·
699c5a8
1
Parent(s):
36a40e7
Remove sequential CPU offload from image generation pipeline in app.py
Browse files
app.py
CHANGED
|
@@ -27,7 +27,6 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
| 27 |
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16).to(device)
|
| 28 |
pipe.vae.enable_tiling()
|
| 29 |
pipe.vae.enable_slicing()
|
| 30 |
-
pipe.enable_sequential_cpu_offload() # offloads modules to CPU on a submodule level (rather than model level)
|
| 31 |
torch.cuda.empty_cache()
|
| 32 |
|
| 33 |
pipe.flux_pipe_call_that_returns_an_iterable_of_images = flux_pipe_call_that_returns_an_iterable_of_images.__get__(pipe)
|
|
|
|
| 27 |
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16).to(device)
|
| 28 |
pipe.vae.enable_tiling()
|
| 29 |
pipe.vae.enable_slicing()
|
|
|
|
| 30 |
torch.cuda.empty_cache()
|
| 31 |
|
| 32 |
pipe.flux_pipe_call_that_returns_an_iterable_of_images = flux_pipe_call_that_returns_an_iterable_of_images.__get__(pipe)
|