Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,8 +8,8 @@ pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=
|
|
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)
|
13 |
|
14 |
def generate_image(prompt, guidance_scale=7.5, num_inference_steps=50):
|
15 |
# Generate an image based on the prompt
|
|
|
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)
|
13 |
|
14 |
def generate_image(prompt, guidance_scale=7.5, num_inference_steps=50):
|
15 |
# Generate an image based on the prompt
|