Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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'''
|