My-AI-Projects commited on
Commit
f973261
Β·
verified Β·
1 Parent(s): 501091f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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