Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -11,23 +11,25 @@ import json
|
|
11 |
from random import randint
|
12 |
|
13 |
# API_URL = "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-schnell"
|
14 |
-
API_URL = "
|
15 |
|
16 |
mod_list = {
|
17 |
"FLUX.1 Schnell": API_URL,
|
18 |
-
"FLUX.1 Schnell | Face Realism": "
|
19 |
-
"FLUX.1 Schnell | Midjourney": "
|
20 |
-
"FLUX.1 Dev": "
|
21 |
-
"FLUX.1 Schnell | realism": "
|
22 |
-
"FLUX.1 Schnell | MJ v6": "
|
23 |
-
"FLUX.1 Dev | Flux Realism": "
|
24 |
-
"FLUX.1 Redux": "
|
25 |
-
"FLUX.1 Dev | UltraRealsim 2.0": "
|
26 |
-
"Lumina Image 2.0": "
|
27 |
-
"FLUX.1 Dev | Vector Journey": "
|
28 |
-
"FLUX.1 Dev | Deep Blue": "
|
29 |
"Realism Engine v1.0": "digiplay/RealismEngine_v1",
|
30 |
-
"Absolute Reality v1.8.1": "digiplay/AbsoluteReality_v1.8.1"
|
|
|
|
|
31 |
}
|
32 |
API_TOKEN = os.getenv("HF_READ_TOKEN")
|
33 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
@@ -126,6 +128,8 @@ def query(prompt, is_realistic, num_inference_steps, width, height, mod = None):
|
|
126 |
for mod_name, mod_link in mod_list.items():
|
127 |
if (mod == mod_name):
|
128 |
model = mod_link
|
|
|
|
|
129 |
|
130 |
response = requests.post(model, headers=headers, json=payload, timeout=timeout)
|
131 |
if response.status_code != 200:
|
|
|
11 |
from random import randint
|
12 |
|
13 |
# API_URL = "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-schnell"
|
14 |
+
API_URL = "black-forest-labs/FLUX.1-schnell"
|
15 |
|
16 |
mod_list = {
|
17 |
"FLUX.1 Schnell": API_URL,
|
18 |
+
"FLUX.1 Schnell | Face Realism": "prithivMLmods/Canopus-LoRA-Flux-FaceRealism",
|
19 |
+
"FLUX.1 Schnell | Midjourney": "Jovie/Midjourney_Schnell",
|
20 |
+
"FLUX.1 Dev": "black-forest-labs/FLUX.1-dev",
|
21 |
+
"FLUX.1 Schnell | realism": "hugovntr/flux-schnell-realism",
|
22 |
+
"FLUX.1 Schnell | MJ v6": "strangerzonehf/Flux-Midjourney-Mix2-LoRA",
|
23 |
+
"FLUX.1 Dev | Flux Realism": "XLabs-AI/flux-RealismLora",
|
24 |
+
"FLUX.1 Redux": "black-forest-labs/FLUX.1-Redux-dev",
|
25 |
+
"FLUX.1 Dev | UltraRealsim 2.0": "prithivMLmods/Canopus-LoRA-Flux-UltraRealism-2.0",
|
26 |
+
"Lumina Image 2.0": "Alpha-VLLM/Lumina-Image-2.0",
|
27 |
+
"FLUX.1 Dev | Vector Journey": "Shakker-Labs/FLUX.1-dev-LoRA-Vector-Journey",
|
28 |
+
"FLUX.1 Dev | Deep Blue": "fffiloni/deep-blue-v2",
|
29 |
"Realism Engine v1.0": "digiplay/RealismEngine_v1",
|
30 |
+
"Absolute Reality v1.8.1": "digiplay/AbsoluteReality_v1.8.1",
|
31 |
+
"FLUX.1 Dev | Midjourney Anime": "brushpenbob/flux-midjourney-anime",
|
32 |
+
"FLUX.1 Dev | ": "brushpenbob/flux-pencil-v2"
|
33 |
}
|
34 |
API_TOKEN = os.getenv("HF_READ_TOKEN")
|
35 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
|
|
128 |
for mod_name, mod_link in mod_list.items():
|
129 |
if (mod == mod_name):
|
130 |
model = mod_link
|
131 |
+
|
132 |
+
model = "https://api-inference.huggingface.co/models/" + model;
|
133 |
|
134 |
response = requests.post(model, headers=headers, json=payload, timeout=timeout)
|
135 |
if response.status_code != 200:
|