Spaces:
Runtime error
Runtime error
Jannik Rößler
commited on
Commit
·
dc60fdb
1
Parent(s):
8bd0428
Update space
Browse files
app.py
CHANGED
|
@@ -8,11 +8,13 @@ import os
|
|
| 8 |
from PIL import Image
|
| 9 |
from diffusers import FluxKontextPipeline
|
| 10 |
from diffusers.utils import load_image
|
| 11 |
-
from huggingface_hub import hf_hub_download, HfFileSystem, ModelCard
|
| 12 |
from safetensors.torch import load_file
|
| 13 |
import requests
|
| 14 |
import re
|
| 15 |
|
|
|
|
|
|
|
| 16 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 17 |
|
| 18 |
MAX_SEED = np.iinfo(np.int32).max
|
|
|
|
| 8 |
from PIL import Image
|
| 9 |
from diffusers import FluxKontextPipeline
|
| 10 |
from diffusers.utils import load_image
|
| 11 |
+
from huggingface_hub import hf_hub_download, HfFileSystem, ModelCard, login
|
| 12 |
from safetensors.torch import load_file
|
| 13 |
import requests
|
| 14 |
import re
|
| 15 |
|
| 16 |
+
login(token=os.environ.get("HF_TOKEN"))
|
| 17 |
+
|
| 18 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 19 |
|
| 20 |
MAX_SEED = np.iinfo(np.int32).max
|