AbhinavKrishnan36 commited on
Commit
82673c9
·
verified ·
1 Parent(s): dcb47e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -10,11 +10,9 @@ if hf_api_key is None:
10
 
11
  # Load model with authentication token
12
  model_id = "stabilityai/stable-diffusion-3.5-medium"
13
- pipe = StableDiffusion3Pipeline.from_pretrained(model_id, use_auth_token=hf_api_key)
14
 
15
- # Move model to the correct device
16
- device = "cuda" if torch.cuda.is_available() else "cpu"
17
- pipe.to(device)
18
 
19
  # Define Gradio interface function
20
  def generate_image(prompt):
 
10
 
11
  # Load model with authentication token
12
  model_id = "stabilityai/stable-diffusion-3.5-medium"
13
+ pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3.5-medium")
14
 
15
+ pipe.to("cuda")# If you have GPU access; otherwise, use "cpu"
 
 
16
 
17
  # Define Gradio interface function
18
  def generate_image(prompt):