Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,11 @@ import torch
|
|
6 |
|
7 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
8 |
|
|
|
|
|
|
|
|
|
|
|
9 |
if torch.cuda.is_available():
|
10 |
torch.cuda.max_memory_allocated(device=device)
|
11 |
pipe = DiffusionPipeline.from_pretrained("Shaleen123/kandinsky_2.5", torch_dtype=torch.float16, variant="fp16", use_safetensors=True)
|
|
|
6 |
|
7 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
8 |
|
9 |
+
import os
|
10 |
+
token_key = os.getenv('HF_KEY')
|
11 |
+
|
12 |
+
!huggingface-cli login token={token_key}
|
13 |
+
|
14 |
if torch.cuda.is_available():
|
15 |
torch.cuda.max_memory_allocated(device=device)
|
16 |
pipe = DiffusionPipeline.from_pretrained("Shaleen123/kandinsky_2.5", torch_dtype=torch.float16, variant="fp16", use_safetensors=True)
|