saranbalan commited on
Commit
df7ac0a
1 Parent(s): 5c7b9f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -23,9 +23,9 @@ model_id2 = "stabilityai/stable-diffusion-xl-base-1.0"
23
 
24
  # Initialize Stable Diffusion pipeline based on device
25
  if torch.cuda.is_available():
26
- pipe = StableDiffusionPipeline.from_pretrained(model_id2, torch_dtype=torch.float16)
27
  else:
28
- pipe = StableDiffusionPipeline.from_pretrained(model_id2) # Omit torch_dtype for CPU
29
 
30
  # Move model to the selected device (either GPU or CPU)
31
  pipe = pipe.to(device)
 
23
 
24
  # Initialize Stable Diffusion pipeline based on device
25
  if torch.cuda.is_available():
26
+ pipe = StableDiffusionPipeline.from_pretrained(model_id1, torch_dtype=torch.float16)
27
  else:
28
+ pipe = StableDiffusionPipeline.from_pretrained(model_id1) # Omit torch_dtype for CPU
29
 
30
  # Move model to the selected device (either GPU or CPU)
31
  pipe = pipe.to(device)