Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,10 @@ from PIL import Image, PngImagePlugin
|
|
6 |
from io import BytesIO
|
7 |
import torch
|
8 |
|
9 |
-
|
|
|
|
|
|
|
10 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
11 |
pipe.to(device)
|
12 |
|
|
|
6 |
from io import BytesIO
|
7 |
import torch
|
8 |
|
9 |
+
# required for stable difussion
|
10 |
+
auth_token = os.environ.get("auth_token") #in secret space
|
11 |
+
|
12 |
+
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=auth_token)
|
13 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
14 |
pipe.to(device)
|
15 |
|