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