Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,8 +4,8 @@ from diffusers import FluxPipeline
|
|
| 4 |
from PIL import Image
|
| 5 |
|
| 6 |
# Load the diffusion model
|
| 7 |
-
|
| 8 |
-
|
| 9 |
|
| 10 |
|
| 11 |
# Set the model to the appropriate device
|
|
|
|
| 4 |
from PIL import Image
|
| 5 |
|
| 6 |
# Load the diffusion model
|
| 7 |
+
pipeline = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16)
|
| 8 |
+
pipeline.enable_model_cpu_offload() #save some VRAM by offloading the model to CPU. Remove this if you have enough GPU power
|
| 9 |
|
| 10 |
|
| 11 |
# Set the model to the appropriate device
|