EmoCube commited on
Commit
fe61d0b
·
verified ·
1 Parent(s): 0dd6c57

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -13
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 = "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-schnell"
15
 
16
  mod_list = {
17
  "FLUX.1 Schnell": API_URL,
18
- "FLUX.1 Schnell | Face Realism": "https://api-inference.huggingface.co/models/prithivMLmods/Canopus-LoRA-Flux-FaceRealism",
19
- "FLUX.1 Schnell | Midjourney": "https://api-inference.huggingface.co/models/Jovie/Midjourney_Schnell",
20
- "FLUX.1 Dev": "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-dev",
21
- "FLUX.1 Schnell | realism": "https://api-inference.huggingface.co/models/hugovntr/flux-schnell-realism",
22
- "FLUX.1 Schnell | MJ v6": "https://api-inference.huggingface.co/models/strangerzonehf/Flux-Midjourney-Mix2-LoRA",
23
- "FLUX.1 Dev | Flux Realism": "https://api-inference.huggingface.co/models/XLabs-AI/flux-RealismLora",
24
- "FLUX.1 Redux": "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-Redux-dev",
25
- "FLUX.1 Dev | UltraRealsim 2.0": "https://api-inference.huggingface.co/models/prithivMLmods/Canopus-LoRA-Flux-UltraRealism-2.0",
26
- "Lumina Image 2.0": "https://api-inference.huggingface.co/models/Alpha-VLLM/Lumina-Image-2.0",
27
- "FLUX.1 Dev | Vector Journey": "https://api-inference.huggingface.co/models/Shakker-Labs/FLUX.1-dev-LoRA-Vector-Journey",
28
- "FLUX.1 Dev | Deep Blue": "https://api-inference.huggingface.co/models/fffiloni/deep-blue-v2",
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: