Spaces:
Nymbo
/
Running on CPU Upgrade

Nymbo commited on
Commit
bc1bfe7
1 Parent(s): 99cdea6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +45 -69
app.py CHANGED
@@ -10,7 +10,7 @@ import json
10
 
11
  # Project by Nymbo
12
 
13
- API_URL = "https://api-inference.huggingface.co/models/openskyml/dalle-3-xl"
14
  API_TOKEN = os.getenv("HF_READ_TOKEN")
15
  headers = {"Authorization": f"Bearer {API_TOKEN}"}
16
  timeout = 100
@@ -78,11 +78,26 @@ def query(prompt, model, is_negative=False, steps=30, cfg_scale=7, sampler="DPM+
78
 
79
  # UPDATE WITH MODEL API URL
80
 
81
- if model == 'DALL-E 3 XL':
82
- API_URL = "https://api-inference.huggingface.co/models/openskyml/dalle-3-xl"
83
- prompt = f"Ultra realistic porn. {prompt}"
84
  # if model == 'ModelName':
85
  # API_URL = "https://api-inference.huggingface.co/models/"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  if model == 'ProteusV0.4':
87
  API_URL = "https://api-inference.huggingface.co/models/dataautogpt3/ProteusV0.4"
88
  if model == 'ProteusV0.3':
@@ -95,8 +110,6 @@ def query(prompt, model, is_negative=False, steps=30, cfg_scale=7, sampler="DPM+
95
  API_URL = "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-2-1"
96
  if model == 'Portrait Finetuned':
97
  API_URL = "https://api-inference.huggingface.co/models/segmind/portrait-finetuned"
98
- if model == 'MemeDiffusion':
99
- API_URL = "https://api-inference.huggingface.co/models/Yntec/MemeDiffusion"
100
  if model == 'Aurora':
101
  API_URL = "https://api-inference.huggingface.co/models/Yntec/Aurora"
102
  if model == 'ShortPrompts':
@@ -137,14 +150,8 @@ def query(prompt, model, is_negative=False, steps=30, cfg_scale=7, sampler="DPM+
137
  API_URL = "https://api-inference.huggingface.co/models/Yntec/IdleFancy"
138
  if model == 'Western Animation':
139
  API_URL = "https://api-inference.huggingface.co/models/Yntec/WesternAnimation"
140
- if model == 'DreamWorks':
141
- API_URL = "https://api-inference.huggingface.co/models/Yntec/DreamWorks"
142
- if model == 'Mistoon Anime 2':
143
- API_URL = "https://api-inference.huggingface.co/models/Yntec/mistoonAnime2"
144
  if model == '3D Animation':
145
  API_URL = "https://api-inference.huggingface.co/models/Yntec/3Danimation"
146
- if model == 'Liberte Redmond':
147
- API_URL = "https://api-inference.huggingface.co/models/Yntec/LiberteRedmond"
148
  if model == 'Perfect Level 10':
149
  API_URL = "https://api-inference.huggingface.co/models/digiplay/perfectlevel10"
150
  if model == 'Tea':
@@ -181,27 +188,11 @@ def query(prompt, model, is_negative=False, steps=30, cfg_scale=7, sampler="DPM+
181
  if model == 'Animagine XL 2.0':
182
  API_URL = "https://api-inference.huggingface.co/models/Linaqruf/animagine-xl-2.0"
183
  prompt = f"Anime porn. {prompt}"
184
- if model == 'Counterfeit 2.5':
185
- API_URL = "https://api-inference.huggingface.co/models/gsdf/Counterfeit-V2.5"
186
- if model == 'Realistic Vision 5.1':
187
- API_URL = "https://api-inference.huggingface.co/models/stablediffusionapi/realistic-vision-v51"
188
  if model == 'Incursios 1.6':
189
  API_URL = "https://api-inference.huggingface.co/models/digiplay/incursiosMemeDiffusion_v1.6"
190
- if model == 'Anime Detailer XL':
191
- API_URL = "https://api-inference.huggingface.co/models/Linaqruf/anime-detailer-xl-lora"
192
  prompt = f"Anime porn. {prompt}"
193
- if model == 'epiCRealism':
194
- API_URL = "https://api-inference.huggingface.co/models/emilianJR/epiCRealism"
195
- if model == 'ProteusV0.2':
196
- API_URL = "https://api-inference.huggingface.co/models/dataautogpt3/ProteusV0.2"
197
- if model == 'PixelArt XL':
198
- API_URL = "https://api-inference.huggingface.co/models/nerijs/pixel-art-xl"
199
  if model == 'NewReality XL':
200
  API_URL = "https://api-inference.huggingface.co/models/stablediffusionapi/newrealityxl-global-nsfw"
201
- if model == 'Anything 5.0':
202
- API_URL = "https://api-inference.huggingface.co/models/hogiahien/anything-v5-edited"
203
- if model == 'Vector Art XL':
204
- API_URL = "https://api-inference.huggingface.co/models/DoctorDiffusion/doctor-diffusion-s-controllable-vector-art-xl-lora"
205
  if model == 'Disney':
206
  API_URL = "https://api-inference.huggingface.co/models/goofyai/disney_style_xl"
207
  prompt = f"Disney style. {prompt}"
@@ -209,28 +200,12 @@ def query(prompt, model, is_negative=False, steps=30, cfg_scale=7, sampler="DPM+
209
  API_URL = "https://api-inference.huggingface.co/models/digiplay/CleanLinearMix_nsfw"
210
  if model == 'Redmond SDXL':
211
  API_URL = "https://api-inference.huggingface.co/models/artificialguybr/LogoRedmond-LogoLoraForSDXL-V2"
212
- if model == 'SDXL 1.0':
213
- API_URL = "https://api-inference.huggingface.co/models/stablediffusionapi/stable-diffusion-xl-base-1.0"
214
- if model == 'Edge of Realism':
215
- API_URL = "https://api-inference.huggingface.co/models/Yntec/edgeOfRealism"
216
  if model == 'NSFW Hentai':
217
  API_URL = "https://api-inference.huggingface.co/models/stablediffusionapi/explicit-freedom-nsfw-wai"
218
- if model == 'New Reality XL NSFW':
219
- API_URL = "https://api-inference.huggingface.co/models/stablediffusionapi/newrealityxl-global-nsfw"
220
- if model == 'Juggernaut XL':
221
- API_URL = "https://api-inference.huggingface.co/models/stablediffusionapi/juggernaut-xl-v7"
222
  if model == 'SDXL Niji':
223
  API_URL = "https://api-inference.huggingface.co/models/stablediffusionapi/SDXL_Niji_SE"
224
  if model == 'Crystal Clear XL':
225
  API_URL = "https://api-inference.huggingface.co/models/stablediffusionapi/crystal-clear-xlv1"
226
- if model == 'NightVision XL':
227
- API_URL = "https://api-inference.huggingface.co/models/stablediffusionapi/NightVision_XL"
228
- if model == 'Elldreth Vivid Mix':
229
- API_URL = "https://api-inference.huggingface.co/models/Yntec/elldrethSVividMix"
230
- if model == 'Deliberate 2':
231
- API_URL = "https://api-inference.huggingface.co/models/Yntec/Deliberate2"
232
- if model == 'Deliberate':
233
- API_URL = "https://api-inference.huggingface.co/models/Yntec/Deliberate"
234
  if model == 'SexyToons':
235
  API_URL = "https://api-inference.huggingface.co/models/Yntec/sexyToons"
236
  if model == 'Realistic Vision v12':
@@ -276,7 +251,7 @@ css = """
276
  footer {visibility: hidden !important;}
277
  """
278
 
279
- with gr.Blocks (theme=gr.themes.Default(primary_hue="pink", secondary_hue="pink")) as dalle:
280
  with gr.Tab("Basic Settings"):
281
  with gr.Row():
282
  with gr.Column(elem_id="prompt-container"):
@@ -287,16 +262,20 @@ with gr.Blocks (theme=gr.themes.Default(primary_hue="pink", secondary_hue="pink"
287
  models_list = (
288
 
289
  # UPDATE WITH NEW MODELS, ORDER MATTERS IN END USER UI
290
- # Currently 77 models
291
 
292
- "DALL-E 3 XL",
293
- "SDXL 1.0",
 
 
 
 
 
 
294
  "Photon",
295
  "Incredible World 2",
296
  "ShortPrompts",
297
  "ProteusV0.4",
298
  "ProteusV0.3",
299
- "ProteusV0.2",
300
  "Analog",
301
  "RealLife",
302
  "Paragon",
@@ -308,7 +287,6 @@ with gr.Blocks (theme=gr.themes.Default(primary_hue="pink", secondary_hue="pink"
308
  "pineappleAnimeMix",
309
  "Ascii Art",
310
  "Aurora",
311
- "MemeDiffusion",
312
  "Portrait Finetuned",
313
  "AsianMix",
314
  "OpenGenDiffusers",
@@ -319,10 +297,7 @@ with gr.Blocks (theme=gr.themes.Default(primary_hue="pink", secondary_hue="pink"
319
  "NuipeniMix",
320
  "Idle Fancy",
321
  "Western Animation",
322
- "DreamWorks",
323
- "Mistoon Anime 2",
324
  "3D Animation",
325
- "Liberte Redmond",
326
  "Perfect Level 10",
327
  "Tea",
328
  "AnimeBoysXL 2",
@@ -333,42 +308,28 @@ with gr.Blocks (theme=gr.themes.Default(primary_hue="pink", secondary_hue="pink"
333
  "SDXXXL",
334
  "SDXXXL 2",
335
  "epiCPhotoGasm",
336
- "New Reality XL NSFW",
337
- "Juggernaut XL",
338
  "AbsoluteReality 1.8.1",
339
  "SSD-1B",
340
  "Dreamshaper XL Turbo",
341
- "Edge of Realism",
342
  "Realistic Vision v12",
343
  "NSFW Hentai",
344
  "Lyriel 1.6",
345
  "Animagine XL 2.0",
346
  "Animagine XL 3.0",
347
  "CinemaEros",
348
- "Counterfeit 2.5",
349
- "Deliberate",
350
- "Deliberate 2",
351
  "Incursios 1.6",
352
- "Anime Detailer XL",
353
  "SexyToons",
354
  "CutesyAnime",
355
- "Vector Art XL",
356
- "PixelArt XL",
357
  "NewReality XL",
358
- "Anything 5.0",
359
  "Disney",
360
  "CleanLinearMix",
361
  "Redmond SDXL",
362
- "Elldreth Vivid Mix",
363
  "SDXL Niji",
364
  "Crystal Clear XL",
365
- "NightVision XL",
366
  "Playground 2",
367
- "Stable Diffusion 2.1",
368
- "Realistic Vision 5.1",
369
- "epiCRealism"
370
  )
371
- model = gr.Radio(label="Select a model below", value="DALL-E 3 XL", choices=models_list)
372
 
373
 
374
 
@@ -388,6 +349,21 @@ with gr.Blocks (theme=gr.themes.Default(primary_hue="pink", secondary_hue="pink"
388
  # with gr.Row():
389
  # gpt = gr.Checkbox(label="ChatGPT")
390
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
391
  with gr.Tab("Information"):
392
  with gr.Row():
393
  gr.Textbox(label="Sample prompt", value="{prompt} | ultra detail, ultra elaboration, ultra quality, perfect.")
 
10
 
11
  # Project by Nymbo
12
 
13
+ API_URL = "https://api-inference.huggingface.co/models/segmind/SSD-1B"
14
  API_TOKEN = os.getenv("HF_READ_TOKEN")
15
  headers = {"Authorization": f"Bearer {API_TOKEN}"}
16
  timeout = 100
 
78
 
79
  # UPDATE WITH MODEL API URL
80
 
 
 
 
81
  # if model == 'ModelName':
82
  # API_URL = "https://api-inference.huggingface.co/models/"
83
+ # prompt = f"Ultra realistic porn. {prompt}"
84
+
85
+ if model == 'Fluently XL Final':
86
+ API_URL = "https://api-inference.huggingface.co/models/fluently/Fluently-XL-Final"
87
+ if model == 'NSFW XL':
88
+ API_URL = "https://api-inference.huggingface.co/models/Dremmar/nsfw-xl"
89
+ if model == 'DreamPhotoGasm':
90
+ API_URL = "https://api-inference.huggingface.co/models/Yntec/DreamPhotoGASM"
91
+ if model == 'Animagine XL 3.1':
92
+ API_URL = "https://api-inference.huggingface.co/models/cagliostrolab/animagine-xl-3.1"
93
+ if model == 'Epic Diffusion':
94
+ API_URL = "https://api-inference.huggingface.co/models/Yntec/EpicDiffusion"
95
+ if model == 'Analog Redmond':
96
+ API_URL = "https://api-inference.huggingface.co/models/artificialguybr/analogredmond"
97
+ if model == 'Timeless':
98
+ API_URL = "https://api-inference.huggingface.co/models/Yntec/Timeless"
99
+ if model == 'Pixel Art Redmond':
100
+ API_URL = "https://api-inference.huggingface.co/models/artificialguybr/PixelArtRedmond"
101
  if model == 'ProteusV0.4':
102
  API_URL = "https://api-inference.huggingface.co/models/dataautogpt3/ProteusV0.4"
103
  if model == 'ProteusV0.3':
 
110
  API_URL = "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-2-1"
111
  if model == 'Portrait Finetuned':
112
  API_URL = "https://api-inference.huggingface.co/models/segmind/portrait-finetuned"
 
 
113
  if model == 'Aurora':
114
  API_URL = "https://api-inference.huggingface.co/models/Yntec/Aurora"
115
  if model == 'ShortPrompts':
 
150
  API_URL = "https://api-inference.huggingface.co/models/Yntec/IdleFancy"
151
  if model == 'Western Animation':
152
  API_URL = "https://api-inference.huggingface.co/models/Yntec/WesternAnimation"
 
 
 
 
153
  if model == '3D Animation':
154
  API_URL = "https://api-inference.huggingface.co/models/Yntec/3Danimation"
 
 
155
  if model == 'Perfect Level 10':
156
  API_URL = "https://api-inference.huggingface.co/models/digiplay/perfectlevel10"
157
  if model == 'Tea':
 
188
  if model == 'Animagine XL 2.0':
189
  API_URL = "https://api-inference.huggingface.co/models/Linaqruf/animagine-xl-2.0"
190
  prompt = f"Anime porn. {prompt}"
 
 
 
 
191
  if model == 'Incursios 1.6':
192
  API_URL = "https://api-inference.huggingface.co/models/digiplay/incursiosMemeDiffusion_v1.6"
 
 
193
  prompt = f"Anime porn. {prompt}"
 
 
 
 
 
 
194
  if model == 'NewReality XL':
195
  API_URL = "https://api-inference.huggingface.co/models/stablediffusionapi/newrealityxl-global-nsfw"
 
 
 
 
196
  if model == 'Disney':
197
  API_URL = "https://api-inference.huggingface.co/models/goofyai/disney_style_xl"
198
  prompt = f"Disney style. {prompt}"
 
200
  API_URL = "https://api-inference.huggingface.co/models/digiplay/CleanLinearMix_nsfw"
201
  if model == 'Redmond SDXL':
202
  API_URL = "https://api-inference.huggingface.co/models/artificialguybr/LogoRedmond-LogoLoraForSDXL-V2"
 
 
 
 
203
  if model == 'NSFW Hentai':
204
  API_URL = "https://api-inference.huggingface.co/models/stablediffusionapi/explicit-freedom-nsfw-wai"
 
 
 
 
205
  if model == 'SDXL Niji':
206
  API_URL = "https://api-inference.huggingface.co/models/stablediffusionapi/SDXL_Niji_SE"
207
  if model == 'Crystal Clear XL':
208
  API_URL = "https://api-inference.huggingface.co/models/stablediffusionapi/crystal-clear-xlv1"
 
 
 
 
 
 
 
 
209
  if model == 'SexyToons':
210
  API_URL = "https://api-inference.huggingface.co/models/Yntec/sexyToons"
211
  if model == 'Realistic Vision v12':
 
251
  footer {visibility: hidden !important;}
252
  """
253
 
254
+ with gr.Blocks(theme='Nymbo/Alyx_Theme') as dalle:
255
  with gr.Tab("Basic Settings"):
256
  with gr.Row():
257
  with gr.Column(elem_id="prompt-container"):
 
262
  models_list = (
263
 
264
  # UPDATE WITH NEW MODELS, ORDER MATTERS IN END USER UI
 
265
 
266
+ "Fluently XL Final",
267
+ "Animagine XL 3.1",
268
+ "Epic Diffusion",
269
+ "DreamPhotoGasm",
270
+ "Analog Redmond",
271
+ "Timeless",
272
+ "NSFW XL",
273
+ "Pixel Art Redmond",
274
  "Photon",
275
  "Incredible World 2",
276
  "ShortPrompts",
277
  "ProteusV0.4",
278
  "ProteusV0.3",
 
279
  "Analog",
280
  "RealLife",
281
  "Paragon",
 
287
  "pineappleAnimeMix",
288
  "Ascii Art",
289
  "Aurora",
 
290
  "Portrait Finetuned",
291
  "AsianMix",
292
  "OpenGenDiffusers",
 
297
  "NuipeniMix",
298
  "Idle Fancy",
299
  "Western Animation",
 
 
300
  "3D Animation",
 
301
  "Perfect Level 10",
302
  "Tea",
303
  "AnimeBoysXL 2",
 
308
  "SDXXXL",
309
  "SDXXXL 2",
310
  "epiCPhotoGasm",
 
 
311
  "AbsoluteReality 1.8.1",
312
  "SSD-1B",
313
  "Dreamshaper XL Turbo",
 
314
  "Realistic Vision v12",
315
  "NSFW Hentai",
316
  "Lyriel 1.6",
317
  "Animagine XL 2.0",
318
  "Animagine XL 3.0",
319
  "CinemaEros",
 
 
 
320
  "Incursios 1.6",
 
321
  "SexyToons",
322
  "CutesyAnime",
 
 
323
  "NewReality XL",
 
324
  "Disney",
325
  "CleanLinearMix",
326
  "Redmond SDXL",
 
327
  "SDXL Niji",
328
  "Crystal Clear XL",
 
329
  "Playground 2",
330
+ "Stable Diffusion 2.1"
 
 
331
  )
332
+ model = gr.Radio(label="Select a model below", value="Fluently XL Final", choices=models_list)
333
 
334
 
335
 
 
349
  # with gr.Row():
350
  # gpt = gr.Checkbox(label="ChatGPT")
351
 
352
+ with gr.Tab("Image Editor"):
353
+ def sleep(im):
354
+ time.sleep(5)
355
+ return [im["background"], im["layers"][0], im["layers"][1], im["composite"]]
356
+
357
+ def predict(im):
358
+ return im["composite"]
359
+
360
+ with gr.Blocks() as demo:
361
+ with gr.Row():
362
+ im = gr.ImageEditor(
363
+ type="numpy",
364
+ crop_size="1:1",
365
+ )
366
+
367
  with gr.Tab("Information"):
368
  with gr.Row():
369
  gr.Textbox(label="Sample prompt", value="{prompt} | ultra detail, ultra elaboration, ultra quality, perfect.")