Spaces:
Runtime error
Runtime error
adding back all original model options
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ API_URL = "https://api-inference.huggingface.co/models/openskyml/dalle-3-xl"
|
|
12 |
API_TOKEN = os.getenv("HF_READ_TOKEN")
|
13 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
14 |
timeout = 100
|
15 |
-
models_list = ["AbsoluteReality 1.8.1", "Openjourney 4", "Vector Art XL", "PixelArt XL", "Anything 5.0", "Disney", "Redmond SDXL"]
|
16 |
|
17 |
# OP's other AI projects: https://ai-hub.rf.gd .
|
18 |
|
@@ -78,12 +78,32 @@ def query(prompt, model, is_negative=False, steps=30, cfg_scale=7, sampler="DPM+
|
|
78 |
print(f'\033[1mГенерация {key}:\033[0m {prompt}')
|
79 |
#if model == 'DALL-E 3 XL':
|
80 |
# API_URL = "https://api-inference.huggingface.co/models/openskyml/dalle-3-xl"
|
|
|
|
|
81 |
if model == 'Openjourney 4':
|
82 |
API_URL = "https://api-inference.huggingface.co/models/prompthero/openjourney-v4"
|
83 |
if model == 'AbsoluteReality 1.8.1':
|
84 |
API_URL = "https://api-inference.huggingface.co/models/digiplay/AbsoluteReality_v1.8.1"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
if model == 'PixelArt XL':
|
86 |
API_URL = "https://api-inference.huggingface.co/models/nerijs/pixel-art-xl"
|
|
|
|
|
87 |
if model == 'Anything 5.0':
|
88 |
API_URL = "https://api-inference.huggingface.co/models/hogiahien/anything-v5-edited"
|
89 |
if model == 'Vector Art XL':
|
@@ -91,10 +111,12 @@ def query(prompt, model, is_negative=False, steps=30, cfg_scale=7, sampler="DPM+
|
|
91 |
if model == 'Disney':
|
92 |
API_URL = "https://api-inference.huggingface.co/models/goofyai/disney_style_xl"
|
93 |
prompt = f"Disney style. {prompt}"
|
|
|
|
|
94 |
if model == 'Redmond SDXL':
|
95 |
API_URL = "https://api-inference.huggingface.co/models/artificialguybr/LogoRedmond-LogoLoraForSDXL-V2"
|
96 |
|
97 |
-
|
98 |
|
99 |
|
100 |
payload = {
|
|
|
12 |
API_TOKEN = os.getenv("HF_READ_TOKEN")
|
13 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
14 |
timeout = 100
|
15 |
+
models_list = ["AbsoluteReality 1.8.1", "Playground 2", "Openjourney 4", "Lyriel 1.6", "Animagine XL 2.0", "Counterfeit 2.5", "Realistic Vision 5.1", "Incursios 1.6", "Anime Detailer XL", "Vector Art XL", "epiCRealism", "PixelArt XL", "NewReality XL", "Anything 5.0", "Disney", "CleanLinearMix", "Redmond SDXL"]
|
16 |
|
17 |
# OP's other AI projects: https://ai-hub.rf.gd .
|
18 |
|
|
|
78 |
print(f'\033[1mГенерация {key}:\033[0m {prompt}')
|
79 |
#if model == 'DALL-E 3 XL':
|
80 |
# API_URL = "https://api-inference.huggingface.co/models/openskyml/dalle-3-xl"
|
81 |
+
if model == 'Playground 2':
|
82 |
+
API_URL = "https://api-inference.huggingface.co/models/playgroundai/playground-v2-1024px-aesthetic"
|
83 |
if model == 'Openjourney 4':
|
84 |
API_URL = "https://api-inference.huggingface.co/models/prompthero/openjourney-v4"
|
85 |
if model == 'AbsoluteReality 1.8.1':
|
86 |
API_URL = "https://api-inference.huggingface.co/models/digiplay/AbsoluteReality_v1.8.1"
|
87 |
+
if model == 'Lyriel 1.6':
|
88 |
+
API_URL = "https://api-inference.huggingface.co/models/stablediffusionapi/lyrielv16"
|
89 |
+
if model == 'Animagine XL 2.0':
|
90 |
+
API_URL = "https://api-inference.huggingface.co/models/Linaqruf/animagine-xl-2.0"
|
91 |
+
prompt = f"Anime. {prompt}"
|
92 |
+
if model == 'Counterfeit 2.5':
|
93 |
+
API_URL = "https://api-inference.huggingface.co/models/gsdf/Counterfeit-V2.5"
|
94 |
+
if model == 'Realistic Vision 5.1':
|
95 |
+
API_URL = "https://api-inference.huggingface.co/models/stablediffusionapi/realistic-vision-v51"
|
96 |
+
if model == 'Incursios 1.6':
|
97 |
+
API_URL = "https://api-inference.huggingface.co/models/digiplay/incursiosMemeDiffusion_v1.6"
|
98 |
+
if model == 'Anime Detailer XL':
|
99 |
+
API_URL = "https://api-inference.huggingface.co/models/Linaqruf/anime-detailer-xl-lora"
|
100 |
+
prompt = f"Anime. {prompt}"
|
101 |
+
if model == 'epiCRealism':
|
102 |
+
API_URL = "https://api-inference.huggingface.co/models/emilianJR/epiCRealism"
|
103 |
if model == 'PixelArt XL':
|
104 |
API_URL = "https://api-inference.huggingface.co/models/nerijs/pixel-art-xl"
|
105 |
+
if model == 'NewReality XL':
|
106 |
+
API_URL = "https://api-inference.huggingface.co/models/stablediffusionapi/newrealityxl-global-nsfw"
|
107 |
if model == 'Anything 5.0':
|
108 |
API_URL = "https://api-inference.huggingface.co/models/hogiahien/anything-v5-edited"
|
109 |
if model == 'Vector Art XL':
|
|
|
111 |
if model == 'Disney':
|
112 |
API_URL = "https://api-inference.huggingface.co/models/goofyai/disney_style_xl"
|
113 |
prompt = f"Disney style. {prompt}"
|
114 |
+
if model == 'CleanLinearMix':
|
115 |
+
API_URL = "https://api-inference.huggingface.co/models/digiplay/CleanLinearMix_nsfw"
|
116 |
if model == 'Redmond SDXL':
|
117 |
API_URL = "https://api-inference.huggingface.co/models/artificialguybr/LogoRedmond-LogoLoraForSDXL-V2"
|
118 |
|
119 |
+
|
120 |
|
121 |
|
122 |
payload = {
|