Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,11 +6,11 @@ from PIL import Image
|
|
| 6 |
from diffusers import DiffusionPipeline
|
| 7 |
from huggingface_hub import login
|
| 8 |
import os
|
| 9 |
-
|
| 10 |
-
|
| 11 |
|
| 12 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 13 |
-
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-0.9",
|
| 14 |
pipe = pipe.to(device)
|
| 15 |
pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
|
| 16 |
|
|
|
|
| 6 |
from diffusers import DiffusionPipeline
|
| 7 |
from huggingface_hub import login
|
| 8 |
import os
|
| 9 |
+
|
| 10 |
+
os.environ['HF_KEY']
|
| 11 |
|
| 12 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 13 |
+
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-0.9", token='HF_KEY')
|
| 14 |
pipe = pipe.to(device)
|
| 15 |
pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
|
| 16 |
|