andresgtn commited on
Commit
fc0f271
·
1 Parent(s): edfd3c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -12,7 +12,7 @@ auth_token = os.environ.get("auth_token") #in secret space
12
 
13
  pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=auth_token)
14
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
15
- pipe.to(device)
16
 
17
  def encode_pil_to_base64(pil_image):
18
  ''' From: https://github.com/gradio-app/gradio/blob/main/gradio/processing_utils.py'''
 
12
 
13
  pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=auth_token)
14
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
15
+ pipe = pipe.to(device)
16
 
17
  def encode_pil_to_base64(pil_image):
18
  ''' From: https://github.com/gradio-app/gradio/blob/main/gradio/processing_utils.py'''