r3gm commited on
Commit
dd2108f
1 Parent(s): ae5f01d

Update constants.py

Browse files
Files changed (1) hide show
  1. constants.py +471 -453
constants.py CHANGED
@@ -1,453 +1,471 @@
1
- import os
2
- from stablepy.diffusers_vanilla.constants import FLUX_CN_UNION_MODES
3
- from stablepy import (
4
- scheduler_names,
5
- SD15_TASKS,
6
- SDXL_TASKS,
7
- )
8
-
9
- # - **Download Models**
10
- DOWNLOAD_MODEL = "https://civitai.com/api/download/models/574369, https://huggingface.co/TechnoByte/MilkyWonderland/resolve/main/milkyWonderland_v40.safetensors"
11
-
12
- # - **Download VAEs**
13
- DOWNLOAD_VAE = "https://huggingface.co/nubby/blessed-sdxl-vae-fp16-fix/resolve/main/sdxl_vae-fp16fix-c-1.1-b-0.5.safetensors?download=true, https://huggingface.co/nubby/blessed-sdxl-vae-fp16-fix/resolve/main/sdxl_vae-fp16fix-blessed.safetensors?download=true, https://huggingface.co/digiplay/VAE/resolve/main/vividReal_v20.safetensors?download=true, https://huggingface.co/fp16-guy/anything_kl-f8-anime2_vae-ft-mse-840000-ema-pruned_blessed_clearvae_fp16_cleaned/resolve/main/vae-ft-mse-840000-ema-pruned_fp16.safetensors?download=true"
14
-
15
- # - **Download LoRAs**
16
- DOWNLOAD_LORA = "https://huggingface.co/Leopain/color/resolve/main/Coloring_book_-_LineArt.safetensors, https://civitai.com/api/download/models/135867, https://huggingface.co/Linaqruf/anime-detailer-xl-lora/resolve/main/anime-detailer-xl.safetensors?download=true, https://huggingface.co/Linaqruf/style-enhancer-xl-lora/resolve/main/style-enhancer-xl.safetensors?download=true, https://huggingface.co/ByteDance/Hyper-SD/resolve/main/Hyper-SD15-8steps-CFG-lora.safetensors?download=true, https://huggingface.co/ByteDance/Hyper-SD/resolve/main/Hyper-SDXL-8steps-CFG-lora.safetensors?download=true"
17
-
18
- LOAD_DIFFUSERS_FORMAT_MODEL = [
19
- 'stabilityai/stable-diffusion-xl-base-1.0',
20
- 'black-forest-labs/FLUX.1-dev',
21
- 'John6666/blue-pencil-flux1-v021-fp8-flux',
22
- 'John6666/wai-ani-flux-v10forfp8-fp8-flux',
23
- 'John6666/xe-anime-flux-v04-fp8-flux',
24
- 'John6666/lyh-anime-flux-v2a1-fp8-flux',
25
- 'John6666/carnival-unchained-v10-fp8-flux',
26
- 'cagliostrolab/animagine-xl-3.1',
27
- 'John6666/epicrealism-xl-v8kiss-sdxl',
28
- 'misri/epicrealismXL_v7FinalDestination',
29
- 'misri/juggernautXL_juggernautX',
30
- 'misri/zavychromaxl_v80',
31
- 'SG161222/RealVisXL_V4.0',
32
- 'SG161222/RealVisXL_V5.0',
33
- 'misri/newrealityxlAllInOne_Newreality40',
34
- 'eienmojiki/Anything-XL',
35
- 'eienmojiki/Starry-XL-v5.2',
36
- 'gsdf/CounterfeitXL',
37
- 'KBlueLeaf/Kohaku-XL-Zeta',
38
- 'John6666/silvermoon-mix-01xl-v11-sdxl',
39
- 'WhiteAiZ/autismmixSDXL_autismmixConfetti_diffusers',
40
- 'kitty7779/ponyDiffusionV6XL',
41
- 'GraydientPlatformAPI/aniverse-pony',
42
- 'John6666/ras-real-anime-screencap-v1-sdxl',
43
- 'John6666/duchaiten-pony-xl-no-score-v60-sdxl',
44
- 'John6666/mistoon-anime-ponyalpha-sdxl',
45
- 'John6666/3x3x3mixxl-v2-sdxl',
46
- 'John6666/3x3x3mixxl-3dv01-sdxl',
47
- 'John6666/ebara-mfcg-pony-mix-v12-sdxl',
48
- 'John6666/t-ponynai3-v51-sdxl',
49
- 'John6666/t-ponynai3-v65-sdxl',
50
- 'John6666/prefect-pony-xl-v3-sdxl',
51
- 'John6666/mala-anime-mix-nsfw-pony-xl-v5-sdxl',
52
- 'John6666/wai-real-mix-v11-sdxl',
53
- 'John6666/wai-c-v6-sdxl',
54
- 'John6666/iniverse-mix-xl-sfwnsfw-pony-guofeng-v43-sdxl',
55
- 'John6666/photo-realistic-pony-v5-sdxl',
56
- 'John6666/pony-realism-v21main-sdxl',
57
- 'John6666/pony-realism-v22main-sdxl',
58
- 'John6666/cyberrealistic-pony-v63-sdxl',
59
- 'John6666/cyberrealistic-pony-v64-sdxl',
60
- 'John6666/cyberrealistic-pony-v65-sdxl',
61
- 'GraydientPlatformAPI/realcartoon-pony-diffusion',
62
- 'John6666/nova-anime-xl-pony-v5-sdxl',
63
- 'John6666/autismmix-sdxl-autismmix-pony-sdxl',
64
- 'John6666/aimz-dream-real-pony-mix-v3-sdxl',
65
- 'John6666/duchaiten-pony-real-v11fix-sdxl',
66
- 'John6666/duchaiten-pony-real-v20-sdxl',
67
- 'yodayo-ai/kivotos-xl-2.0',
68
- 'yodayo-ai/holodayo-xl-2.1',
69
- 'yodayo-ai/clandestine-xl-1.0',
70
- 'digiplay/majicMIX_sombre_v2',
71
- 'digiplay/majicMIX_realistic_v6',
72
- 'digiplay/majicMIX_realistic_v7',
73
- 'digiplay/DreamShaper_8',
74
- 'digiplay/BeautifulArt_v1',
75
- 'digiplay/DarkSushi2.5D_v1',
76
- 'digiplay/darkphoenix3D_v1.1',
77
- 'digiplay/BeenYouLiteL11_diffusers',
78
- 'Yntec/RevAnimatedV2Rebirth',
79
- 'youknownothing/cyberrealistic_v50',
80
- 'youknownothing/deliberate-v6',
81
- 'GraydientPlatformAPI/deliberate-cyber3',
82
- 'GraydientPlatformAPI/picx-real',
83
- 'GraydientPlatformAPI/perfectworld6',
84
- 'emilianJR/epiCRealism',
85
- 'votepurchase/counterfeitV30_v30',
86
- 'votepurchase/ChilloutMix',
87
- 'Meina/MeinaMix_V11',
88
- 'Meina/MeinaUnreal_V5',
89
- 'Meina/MeinaPastel_V7',
90
- 'GraydientPlatformAPI/realcartoon3d-17',
91
- 'GraydientPlatformAPI/realcartoon-pixar11',
92
- 'GraydientPlatformAPI/realcartoon-real17',
93
- ]
94
-
95
- DIFFUSERS_FORMAT_LORAS = [
96
- "nerijs/animation2k-flux",
97
- "XLabs-AI/flux-RealismLora",
98
- ]
99
-
100
- DOWNLOAD_EMBEDS = [
101
- 'https://huggingface.co/datasets/Nerfgun3/bad_prompt/blob/main/bad_prompt_version2.pt',
102
- 'https://huggingface.co/embed/negative/resolve/main/EasyNegativeV2.safetensors',
103
- 'https://huggingface.co/embed/negative/resolve/main/bad-hands-5.pt',
104
- ]
105
-
106
- CIVITAI_API_KEY = os.environ.get("CIVITAI_API_KEY")
107
- HF_TOKEN = os.environ.get("HF_READ_TOKEN")
108
-
109
- DIRECTORY_MODELS = 'models'
110
- DIRECTORY_LORAS = 'loras'
111
- DIRECTORY_VAES = 'vaes'
112
- DIRECTORY_EMBEDS = 'embedings'
113
-
114
- PREPROCESSOR_CONTROLNET = {
115
- "openpose": [
116
- "Openpose",
117
- "None",
118
- ],
119
- "scribble": [
120
- "HED",
121
- "PidiNet",
122
- "None",
123
- ],
124
- "softedge": [
125
- "PidiNet",
126
- "HED",
127
- "HED safe",
128
- "PidiNet safe",
129
- "None",
130
- ],
131
- "segmentation": [
132
- "UPerNet",
133
- "None",
134
- ],
135
- "depth": [
136
- "DPT",
137
- "Midas",
138
- "None",
139
- ],
140
- "normalbae": [
141
- "NormalBae",
142
- "None",
143
- ],
144
- "lineart": [
145
- "Lineart",
146
- "Lineart coarse",
147
- "Lineart (anime)",
148
- "None",
149
- "None (anime)",
150
- ],
151
- "lineart_anime": [
152
- "Lineart",
153
- "Lineart coarse",
154
- "Lineart (anime)",
155
- "None",
156
- "None (anime)",
157
- ],
158
- "shuffle": [
159
- "ContentShuffle",
160
- "None",
161
- ],
162
- "canny": [
163
- "Canny",
164
- "None",
165
- ],
166
- "mlsd": [
167
- "MLSD",
168
- "None",
169
- ],
170
- "ip2p": [
171
- "ip2p"
172
- ],
173
- "recolor": [
174
- "Recolor luminance",
175
- "Recolor intensity",
176
- "None",
177
- ],
178
- "tile": [
179
- "Mild Blur",
180
- "Moderate Blur",
181
- "Heavy Blur",
182
- "None",
183
- ],
184
-
185
- }
186
-
187
- TASK_STABLEPY = {
188
- 'txt2img': 'txt2img',
189
- 'img2img': 'img2img',
190
- 'inpaint': 'inpaint',
191
- # 'canny T2I Adapter': 'sdxl_canny_t2i', # NO HAVE STEP CALLBACK PARAMETERS SO NOT WORKS WITH DIFFUSERS 0.29.0
192
- # 'sketch T2I Adapter': 'sdxl_sketch_t2i',
193
- # 'lineart T2I Adapter': 'sdxl_lineart_t2i',
194
- # 'depth-midas T2I Adapter': 'sdxl_depth-midas_t2i',
195
- # 'openpose T2I Adapter': 'sdxl_openpose_t2i',
196
- 'openpose ControlNet': 'openpose',
197
- 'canny ControlNet': 'canny',
198
- 'mlsd ControlNet': 'mlsd',
199
- 'scribble ControlNet': 'scribble',
200
- 'softedge ControlNet': 'softedge',
201
- 'segmentation ControlNet': 'segmentation',
202
- 'depth ControlNet': 'depth',
203
- 'normalbae ControlNet': 'normalbae',
204
- 'lineart ControlNet': 'lineart',
205
- 'lineart_anime ControlNet': 'lineart_anime',
206
- 'shuffle ControlNet': 'shuffle',
207
- 'ip2p ControlNet': 'ip2p',
208
- 'optical pattern ControlNet': 'pattern',
209
- 'recolor ControlNet': 'recolor',
210
- 'tile ControlNet': 'tile',
211
- }
212
-
213
- TASK_MODEL_LIST = list(TASK_STABLEPY.keys())
214
-
215
- UPSCALER_DICT_GUI = {
216
- None: None,
217
- "Lanczos": "Lanczos",
218
- "Nearest": "Nearest",
219
- 'Latent': 'Latent',
220
- 'Latent (antialiased)': 'Latent (antialiased)',
221
- 'Latent (bicubic)': 'Latent (bicubic)',
222
- 'Latent (bicubic antialiased)': 'Latent (bicubic antialiased)',
223
- 'Latent (nearest)': 'Latent (nearest)',
224
- 'Latent (nearest-exact)': 'Latent (nearest-exact)',
225
- "RealESRGAN_x4plus": "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth",
226
- "RealESRNet_x4plus": "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.1/RealESRNet_x4plus.pth",
227
- "RealESRGAN_x4plus_anime_6B": "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.2.4/RealESRGAN_x4plus_anime_6B.pth",
228
- "RealESRGAN_x2plus": "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth",
229
- "realesr-animevideov3": "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesr-animevideov3.pth",
230
- "realesr-general-x4v3": "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesr-general-x4v3.pth",
231
- "realesr-general-wdn-x4v3": "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesr-general-wdn-x4v3.pth",
232
- "4x-UltraSharp": "https://huggingface.co/Shandypur/ESRGAN-4x-UltraSharp/resolve/main/4x-UltraSharp.pth",
233
- "4x_foolhardy_Remacri": "https://huggingface.co/FacehugmanIII/4x_foolhardy_Remacri/resolve/main/4x_foolhardy_Remacri.pth",
234
- "Remacri4xExtraSmoother": "https://huggingface.co/hollowstrawberry/upscalers-backup/resolve/main/ESRGAN/Remacri%204x%20ExtraSmoother.pth",
235
- "AnimeSharp4x": "https://huggingface.co/hollowstrawberry/upscalers-backup/resolve/main/ESRGAN/AnimeSharp%204x.pth",
236
- "lollypop": "https://huggingface.co/hollowstrawberry/upscalers-backup/resolve/main/ESRGAN/lollypop.pth",
237
- "RealisticRescaler4x": "https://huggingface.co/hollowstrawberry/upscalers-backup/resolve/main/ESRGAN/RealisticRescaler%204x.pth",
238
- "NickelbackFS4x": "https://huggingface.co/hollowstrawberry/upscalers-backup/resolve/main/ESRGAN/NickelbackFS%204x.pth"
239
- }
240
-
241
- UPSCALER_KEYS = list(UPSCALER_DICT_GUI.keys())
242
-
243
- PROMPT_W_OPTIONS = [
244
- ("Compel format: (word)weight", "Compel"),
245
- ("Classic format: (word:weight)", "Classic"),
246
- ("Classic-original format: (word:weight)", "Classic-original"),
247
- ("Classic-no_norm format: (word:weight)", "Classic-no_norm"),
248
- ("Classic-ignore", "Classic-ignore"),
249
- ("None", "None"),
250
- ]
251
-
252
- WARNING_MSG_VAE = (
253
- "Use the right VAE for your model to maintain image quality. The wrong"
254
- " VAE can lead to poor results, like blurriness in the generated images."
255
- )
256
-
257
- SDXL_TASK = [k for k, v in TASK_STABLEPY.items() if v in SDXL_TASKS]
258
- SD_TASK = [k for k, v in TASK_STABLEPY.items() if v in SD15_TASKS]
259
- FLUX_TASK = list(TASK_STABLEPY.keys())[:3] + [k for k, v in TASK_STABLEPY.items() if v in FLUX_CN_UNION_MODES.keys()]
260
-
261
- MODEL_TYPE_TASK = {
262
- "SD 1.5": SD_TASK,
263
- "SDXL": SDXL_TASK,
264
- "FLUX": FLUX_TASK,
265
- }
266
-
267
- MODEL_TYPE_CLASS = {
268
- "diffusers:StableDiffusionPipeline": "SD 1.5",
269
- "diffusers:StableDiffusionXLPipeline": "SDXL",
270
- "diffusers:FluxPipeline": "FLUX",
271
- }
272
-
273
- POST_PROCESSING_SAMPLER = ["Use same sampler"] + scheduler_names[:-2]
274
-
275
- SUBTITLE_GUI = (
276
- "### This demo uses [diffusers](https://github.com/huggingface/diffusers)"
277
- " to perform different tasks in image generation."
278
- )
279
-
280
- HELP_GUI = (
281
- """### Help:
282
- - The current space runs on a ZERO GPU which is assigned for approximately 60 seconds; Therefore, if you submit expensive tasks, the operation may be canceled upon reaching the maximum allowed time with 'GPU TASK ABORTED'.
283
- - Distorted or strange images often result from high prompt weights, so it's best to use low weights and scales, and consider using Classic variants like 'Classic-original'.
284
- - For better results with Pony Diffusion, try using sampler DPM++ 1s or DPM2 with Compel or Classic prompt weights.
285
- """
286
- )
287
-
288
- EXAMPLES_GUI_HELP = (
289
- """### The following examples perform specific tasks:
290
- 1. Generation with SDXL and upscale
291
- 2. Generation with FLUX dev
292
- 3. ControlNet Canny SDXL
293
- 4. Optical pattern (Optical illusion) SDXL
294
- 5. Convert an image to a coloring drawing
295
- 6. ControlNet OpenPose SD 1.5 and Latent upscale
296
-
297
- - Different tasks can be performed, such as img2img or using the IP adapter, to preserve a person's appearance or a specific style based on an image.
298
- """
299
- )
300
-
301
- EXAMPLES_GUI = [
302
- [
303
- "1girl, souryuu asuka langley, neon genesis evangelion, rebuild of evangelion, lance of longinus, cat hat, plugsuit, pilot suit, red bodysuit, sitting, crossed legs, black eye patch, throne, looking down, from bottom, looking at viewer, outdoors, (masterpiece), (best quality), (ultra-detailed), very aesthetic, illustration, disheveled hair, perfect composition, moist skin, intricate details",
304
- "nfsw, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, unfinished, very displeasing, oldest, early, chromatic aberration, artistic error, scan, abstract",
305
- 28,
306
- 7.0,
307
- -1,
308
- "None",
309
- 0.33,
310
- "Euler a",
311
- 1152,
312
- 896,
313
- "cagliostrolab/animagine-xl-3.1",
314
- "txt2img",
315
- "image.webp", # img conttol
316
- 1024, # img resolution
317
- 0.35, # strength
318
- 1.0, # cn scale
319
- 0.0, # cn start
320
- 1.0, # cn end
321
- "Classic",
322
- "Nearest",
323
- 45,
324
- False,
325
- ],
326
- [
327
- "a digital illustration of a movie poster titled 'Finding Emo', finding nemo parody poster, featuring a depressed cartoon clownfish with black emo hair, eyeliner, and piercings, bored expression, swimming in a dark underwater scene, in the background, movie title in a dripping, grungy font, moody blue and purple color palette",
328
- "",
329
- 24,
330
- 3.5,
331
- -1,
332
- "None",
333
- 0.33,
334
- "Euler a",
335
- 1152,
336
- 896,
337
- "black-forest-labs/FLUX.1-dev",
338
- "txt2img",
339
- None, # img conttol
340
- 1024, # img resolution
341
- 0.35, # strength
342
- 1.0, # cn scale
343
- 0.0, # cn start
344
- 1.0, # cn end
345
- "Classic",
346
- None,
347
- 70,
348
- True,
349
- ],
350
- [
351
- "((masterpiece)), best quality, blonde disco girl, detailed face, realistic face, realistic hair, dynamic pose, pink pvc, intergalactic disco background, pastel lights, dynamic contrast, airbrush, fine detail, 70s vibe, midriff",
352
- "(worst quality:1.2), (bad quality:1.2), (poor quality:1.2), (missing fingers:1.2), bad-artist-anime, bad-artist, bad-picture-chill-75v",
353
- 48,
354
- 3.5,
355
- -1,
356
- "None",
357
- 0.33,
358
- "DPM++ 2M SDE Lu",
359
- 1024,
360
- 1024,
361
- "misri/epicrealismXL_v7FinalDestination",
362
- "canny ControlNet",
363
- "image.webp", # img conttol
364
- 1024, # img resolution
365
- 0.35, # strength
366
- 1.0, # cn scale
367
- 0.0, # cn start
368
- 1.0, # cn end
369
- "Classic",
370
- None,
371
- 44,
372
- False,
373
- ],
374
- [
375
- "cinematic scenery old city ruins",
376
- "(worst quality, low quality, illustration, 3d, 2d, painting, cartoons, sketch), (illustration, 3d, 2d, painting, cartoons, sketch, blurry, film grain, noise), (low quality, worst quality:1.2)",
377
- 50,
378
- 4.0,
379
- -1,
380
- "None",
381
- 0.33,
382
- "Euler a",
383
- 1024,
384
- 1024,
385
- "misri/juggernautXL_juggernautX",
386
- "optical pattern ControlNet",
387
- "spiral_no_transparent.png", # img conttol
388
- 1024, # img resolution
389
- 0.35, # strength
390
- 1.0, # cn scale
391
- 0.05, # cn start
392
- 0.75, # cn end
393
- "Classic",
394
- None,
395
- 35,
396
- False,
397
- ],
398
- [
399
- "black and white, line art, coloring drawing, clean line art, black strokes, no background, white, black, free lines, black scribbles, on paper, A blend of comic book art and lineart full of black and white color, masterpiece, high-resolution, trending on Pixiv fan box, palette knife, brush strokes, two-dimensional, planar vector, T-shirt design, stickers, and T-shirt design, vector art, fantasy art, Adobe Illustrator, hand-painted, digital painting, low polygon, soft lighting, aerial view, isometric style, retro aesthetics, 8K resolution, black sketch lines, monochrome, invert color",
400
- "color, red, green, yellow, colored, duplicate, blurry, abstract, disfigured, deformed, animated, toy, figure, framed, 3d, bad art, poorly drawn, extra limbs, close up, b&w, weird colors, blurry, watermark, blur haze, 2 heads, long neck, watermark, elongated body, cropped image, out of frame, draft, deformed hands, twisted fingers, double image, malformed hands, multiple heads, extra limb, ugly, poorly drawn hands, missing limb, cut-off, over satured, grain, lowères, bad anatomy, poorly drawn face, mutation, mutated, floating limbs, disconnected limbs, out of focus, long body, disgusting, extra fingers, groos proportions, missing arms, mutated hands, cloned face, missing legs, ugly, tiling, poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame, extra limbs, disfigured, deformed, body out of frame, blurry, bad anatomy, blurred, watermark, grainy, signature, cut off, draft, deformed, blurry, bad anatomy, disfigured, poorly drawn face, mutation, bluelish, blue",
401
- 20,
402
- 4.0,
403
- -1,
404
- "loras/Coloring_book_-_LineArt.safetensors",
405
- 1.0,
406
- "DPM++ 2M SDE Karras",
407
- 1024,
408
- 1024,
409
- "cagliostrolab/animagine-xl-3.1",
410
- "lineart ControlNet",
411
- "color_image.png", # img conttol
412
- 896, # img resolution
413
- 0.35, # strength
414
- 1.0, # cn scale
415
- 0.0, # cn start
416
- 1.0, # cn end
417
- "Compel",
418
- None,
419
- 35,
420
- False,
421
- ],
422
- [
423
- "1girl,face,curly hair,red hair,white background,",
424
- "(worst quality:2),(low quality:2),(normal quality:2),lowres,watermark,",
425
- 38,
426
- 5.0,
427
- -1,
428
- "None",
429
- 0.33,
430
- "DPM++ 2M SDE Karras",
431
- 512,
432
- 512,
433
- "digiplay/majicMIX_realistic_v7",
434
- "openpose ControlNet",
435
- "image.webp", # img conttol
436
- 1024, # img resolution
437
- 0.35, # strength
438
- 1.0, # cn scale
439
- 0.0, # cn start
440
- 0.9, # cn end
441
- "Compel",
442
- "Latent (antialiased)",
443
- 46,
444
- False,
445
- ],
446
- ]
447
-
448
- RESOURCES = (
449
- """### Resources
450
- - John6666's space has some great features you might find helpful [link](https://huggingface.co/spaces/John6666/DiffuseCraftMod).
451
- - You can also try the image generator in Colab’s free tier, which provides free GPU [link](https://github.com/R3gm/SD_diffusers_interactive).
452
- """
453
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from stablepy.diffusers_vanilla.constants import FLUX_CN_UNION_MODES
3
+ from stablepy import (
4
+ scheduler_names,
5
+ SD15_TASKS,
6
+ SDXL_TASKS,
7
+ )
8
+
9
+ # - **Download Models**
10
+ DOWNLOAD_MODEL = "https://civitai.com/api/download/models/574369, https://huggingface.co/TechnoByte/MilkyWonderland/resolve/main/milkyWonderland_v40.safetensors"
11
+
12
+ # - **Download VAEs**
13
+ DOWNLOAD_VAE = "https://huggingface.co/nubby/blessed-sdxl-vae-fp16-fix/resolve/main/sdxl_vae-fp16fix-c-1.1-b-0.5.safetensors?download=true, https://huggingface.co/nubby/blessed-sdxl-vae-fp16-fix/resolve/main/sdxl_vae-fp16fix-blessed.safetensors?download=true, https://huggingface.co/digiplay/VAE/resolve/main/vividReal_v20.safetensors?download=true, https://huggingface.co/fp16-guy/anything_kl-f8-anime2_vae-ft-mse-840000-ema-pruned_blessed_clearvae_fp16_cleaned/resolve/main/vae-ft-mse-840000-ema-pruned_fp16.safetensors?download=true"
14
+
15
+ # - **Download LoRAs**
16
+ DOWNLOAD_LORA = "https://huggingface.co/Leopain/color/resolve/main/Coloring_book_-_LineArt.safetensors, https://civitai.com/api/download/models/135867, https://huggingface.co/Linaqruf/anime-detailer-xl-lora/resolve/main/anime-detailer-xl.safetensors?download=true, https://huggingface.co/Linaqruf/style-enhancer-xl-lora/resolve/main/style-enhancer-xl.safetensors?download=true, https://huggingface.co/ByteDance/Hyper-SD/resolve/main/Hyper-SD15-8steps-CFG-lora.safetensors?download=true, https://huggingface.co/ByteDance/Hyper-SD/resolve/main/Hyper-SDXL-8steps-CFG-lora.safetensors?download=true"
17
+
18
+ LOAD_DIFFUSERS_FORMAT_MODEL = [
19
+ 'stabilityai/stable-diffusion-xl-base-1.0',
20
+ 'black-forest-labs/FLUX.1-dev',
21
+ 'John6666/blue-pencil-flux1-v021-fp8-flux',
22
+ 'John6666/wai-ani-flux-v10forfp8-fp8-flux',
23
+ 'John6666/xe-anime-flux-v04-fp8-flux',
24
+ 'John6666/lyh-anime-flux-v2a1-fp8-flux',
25
+ 'John6666/carnival-unchained-v10-fp8-flux',
26
+ 'Freepik/flux.1-lite-8B-alpha',
27
+ 'ostris/OpenFLUX.1',
28
+ 'John6666/noobai-xl-nai-xl-epsilonpred10version-sdxl',
29
+ 'John6666/noobai-xl-nai-xl-epsilonpred075version-sdxl',
30
+ 'John6666/noobai-xl-nai-xl-epsilonpred05version-sdxl',
31
+ 'John6666/noobai-cyberfix-v10-sdxl',
32
+ 'John6666/noobaiiter-xl-vpred-v075-sdxl',
33
+ 'John6666/complicated-noobai-merge-vprediction-sdxl',
34
+ 'John6666/noobai-fusion2-vpred-itercomp-v1-sdxl',
35
+ 'John6666/noobai-xl-nai-xl-vpredtestversion-sdxl',
36
+ 'John6666/chadmix-noobai075-illustrious01-v10-sdxl',
37
+ 'OnomaAIResearch/Illustrious-xl-early-release-v0',
38
+ 'John6666/obsession-illustriousxl-v21-sdxl',
39
+ 'eienmojiki/Anything-XL',
40
+ 'eienmojiki/Starry-XL-v5.2',
41
+ 'John6666/meinaxl-v2-sdxl',
42
+ 'John6666/epicrealism-xl-v10kiss2-sdxl',
43
+ 'John6666/epicrealism-xl-v8kiss-sdxl',
44
+ 'misri/zavychromaxl_v80',
45
+ 'SG161222/RealVisXL_V4.0',
46
+ 'SG161222/RealVisXL_V5.0',
47
+ 'misri/newrealityxlAllInOne_Newreality40',
48
+ 'gsdf/CounterfeitXL',
49
+ 'John6666/silvermoon-mix-01xl-v11-sdxl',
50
+ 'WhiteAiZ/autismmixSDXL_autismmixConfetti_diffusers',
51
+ 'kitty7779/ponyDiffusionV6XL',
52
+ 'GraydientPlatformAPI/aniverse-pony',
53
+ 'John6666/ras-real-anime-screencap-v1-sdxl',
54
+ 'John6666/duchaiten-pony-xl-no-score-v60-sdxl',
55
+ 'John6666/mistoon-anime-ponyalpha-sdxl',
56
+ 'John6666/3x3x3mixxl-v2-sdxl',
57
+ 'John6666/3x3x3mixxl-3dv01-sdxl',
58
+ 'John6666/ebara-mfcg-pony-mix-v12-sdxl',
59
+ 'John6666/t-ponynai3-v51-sdxl',
60
+ 'John6666/t-ponynai3-v65-sdxl',
61
+ 'John6666/prefect-pony-xl-v3-sdxl',
62
+ 'John6666/mala-anime-mix-nsfw-pony-xl-v5-sdxl',
63
+ 'John6666/wai-real-mix-v11-sdxl',
64
+ 'John6666/wai-c-v6-sdxl',
65
+ 'John6666/iniverse-mix-xl-sfwnsfw-pony-guofeng-v43-sdxl',
66
+ 'John6666/sifw-annihilation-xl-v2-sdxl',
67
+ 'John6666/photo-realistic-pony-v5-sdxl',
68
+ 'John6666/pony-realism-v21main-sdxl',
69
+ 'John6666/pony-realism-v22main-sdxl',
70
+ 'John6666/cyberrealistic-pony-v63-sdxl',
71
+ 'John6666/cyberrealistic-pony-v64-sdxl',
72
+ 'John6666/cyberrealistic-pony-v65-sdxl',
73
+ 'GraydientPlatformAPI/realcartoon-pony-diffusion',
74
+ 'John6666/nova-anime-xl-pony-v5-sdxl',
75
+ 'John6666/autismmix-sdxl-autismmix-pony-sdxl',
76
+ 'John6666/aimz-dream-real-pony-mix-v3-sdxl',
77
+ 'John6666/duchaiten-pony-real-v11fix-sdxl',
78
+ 'John6666/duchaiten-pony-real-v20-sdxl',
79
+ 'John6666/duchaiten-pony-xl-no-score-v70-sdxl',
80
+ 'Eugeoter/artiwaifu-diffusion-2.0',
81
+ 'comin/IterComp',
82
+ 'KBlueLeaf/Kohaku-XL-Zeta',
83
+ 'cagliostrolab/animagine-xl-3.1',
84
+ 'yodayo-ai/kivotos-xl-2.0',
85
+ 'yodayo-ai/holodayo-xl-2.1',
86
+ 'yodayo-ai/clandestine-xl-1.0',
87
+ 'digiplay/majicMIX_sombre_v2',
88
+ 'digiplay/majicMIX_realistic_v6',
89
+ 'digiplay/majicMIX_realistic_v7',
90
+ 'digiplay/DreamShaper_8',
91
+ 'digiplay/BeautifulArt_v1',
92
+ 'digiplay/DarkSushi2.5D_v1',
93
+ 'digiplay/darkphoenix3D_v1.1',
94
+ 'digiplay/BeenYouLiteL11_diffusers',
95
+ 'Yntec/RevAnimatedV2Rebirth',
96
+ 'youknownothing/cyberrealistic_v50',
97
+ 'youknownothing/deliberate-v6',
98
+ 'GraydientPlatformAPI/deliberate-cyber3',
99
+ 'GraydientPlatformAPI/picx-real',
100
+ 'GraydientPlatformAPI/perfectworld6',
101
+ 'emilianJR/epiCRealism',
102
+ 'votepurchase/counterfeitV30_v30',
103
+ 'votepurchase/ChilloutMix',
104
+ 'Meina/MeinaMix_V11',
105
+ 'Meina/MeinaUnreal_V5',
106
+ 'Meina/MeinaPastel_V7',
107
+ 'GraydientPlatformAPI/realcartoon3d-17',
108
+ 'GraydientPlatformAPI/realcartoon-pixar11',
109
+ 'GraydientPlatformAPI/realcartoon-real17',
110
+ 'nitrosocke/Ghibli-Diffusion',
111
+ ]
112
+
113
+ DIFFUSERS_FORMAT_LORAS = [
114
+ "nerijs/animation2k-flux",
115
+ "XLabs-AI/flux-RealismLora",
116
+ ]
117
+
118
+ DOWNLOAD_EMBEDS = [
119
+ 'https://huggingface.co/datasets/Nerfgun3/bad_prompt/blob/main/bad_prompt_version2.pt',
120
+ 'https://huggingface.co/embed/negative/resolve/main/EasyNegativeV2.safetensors',
121
+ 'https://huggingface.co/embed/negative/resolve/main/bad-hands-5.pt',
122
+ ]
123
+
124
+ CIVITAI_API_KEY = os.environ.get("CIVITAI_API_KEY")
125
+ HF_TOKEN = os.environ.get("HF_READ_TOKEN")
126
+
127
+ DIRECTORY_MODELS = 'models'
128
+ DIRECTORY_LORAS = 'loras'
129
+ DIRECTORY_VAES = 'vaes'
130
+ DIRECTORY_EMBEDS = 'embedings'
131
+
132
+ PREPROCESSOR_CONTROLNET = {
133
+ "openpose": [
134
+ "Openpose",
135
+ "None",
136
+ ],
137
+ "scribble": [
138
+ "HED",
139
+ "PidiNet",
140
+ "None",
141
+ ],
142
+ "softedge": [
143
+ "PidiNet",
144
+ "HED",
145
+ "HED safe",
146
+ "PidiNet safe",
147
+ "None",
148
+ ],
149
+ "segmentation": [
150
+ "UPerNet",
151
+ "None",
152
+ ],
153
+ "depth": [
154
+ "DPT",
155
+ "Midas",
156
+ "None",
157
+ ],
158
+ "normalbae": [
159
+ "NormalBae",
160
+ "None",
161
+ ],
162
+ "lineart": [
163
+ "Lineart",
164
+ "Lineart coarse",
165
+ "Lineart (anime)",
166
+ "None",
167
+ "None (anime)",
168
+ ],
169
+ "lineart_anime": [
170
+ "Lineart",
171
+ "Lineart coarse",
172
+ "Lineart (anime)",
173
+ "None",
174
+ "None (anime)",
175
+ ],
176
+ "shuffle": [
177
+ "ContentShuffle",
178
+ "None",
179
+ ],
180
+ "canny": [
181
+ "Canny",
182
+ "None",
183
+ ],
184
+ "mlsd": [
185
+ "MLSD",
186
+ "None",
187
+ ],
188
+ "ip2p": [
189
+ "ip2p"
190
+ ],
191
+ "recolor": [
192
+ "Recolor luminance",
193
+ "Recolor intensity",
194
+ "None",
195
+ ],
196
+ "tile": [
197
+ "Mild Blur",
198
+ "Moderate Blur",
199
+ "Heavy Blur",
200
+ "None",
201
+ ],
202
+
203
+ }
204
+
205
+ TASK_STABLEPY = {
206
+ 'txt2img': 'txt2img',
207
+ 'img2img': 'img2img',
208
+ 'inpaint': 'inpaint',
209
+ # 'canny T2I Adapter': 'sdxl_canny_t2i', # NO HAVE STEP CALLBACK PARAMETERS SO NOT WORKS WITH DIFFUSERS 0.29.0
210
+ # 'sketch T2I Adapter': 'sdxl_sketch_t2i',
211
+ # 'lineart T2I Adapter': 'sdxl_lineart_t2i',
212
+ # 'depth-midas T2I Adapter': 'sdxl_depth-midas_t2i',
213
+ # 'openpose T2I Adapter': 'sdxl_openpose_t2i',
214
+ 'openpose ControlNet': 'openpose',
215
+ 'canny ControlNet': 'canny',
216
+ 'mlsd ControlNet': 'mlsd',
217
+ 'scribble ControlNet': 'scribble',
218
+ 'softedge ControlNet': 'softedge',
219
+ 'segmentation ControlNet': 'segmentation',
220
+ 'depth ControlNet': 'depth',
221
+ 'normalbae ControlNet': 'normalbae',
222
+ 'lineart ControlNet': 'lineart',
223
+ 'lineart_anime ControlNet': 'lineart_anime',
224
+ 'shuffle ControlNet': 'shuffle',
225
+ 'ip2p ControlNet': 'ip2p',
226
+ 'optical pattern ControlNet': 'pattern',
227
+ 'recolor ControlNet': 'recolor',
228
+ 'tile ControlNet': 'tile',
229
+ }
230
+
231
+ TASK_MODEL_LIST = list(TASK_STABLEPY.keys())
232
+
233
+ UPSCALER_DICT_GUI = {
234
+ None: None,
235
+ "Lanczos": "Lanczos",
236
+ "Nearest": "Nearest",
237
+ 'Latent': 'Latent',
238
+ 'Latent (antialiased)': 'Latent (antialiased)',
239
+ 'Latent (bicubic)': 'Latent (bicubic)',
240
+ 'Latent (bicubic antialiased)': 'Latent (bicubic antialiased)',
241
+ 'Latent (nearest)': 'Latent (nearest)',
242
+ 'Latent (nearest-exact)': 'Latent (nearest-exact)',
243
+ "RealESRGAN_x4plus": "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth",
244
+ "RealESRNet_x4plus": "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.1/RealESRNet_x4plus.pth",
245
+ "RealESRGAN_x4plus_anime_6B": "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.2.4/RealESRGAN_x4plus_anime_6B.pth",
246
+ "RealESRGAN_x2plus": "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth",
247
+ "realesr-animevideov3": "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesr-animevideov3.pth",
248
+ "realesr-general-x4v3": "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesr-general-x4v3.pth",
249
+ "realesr-general-wdn-x4v3": "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesr-general-wdn-x4v3.pth",
250
+ "4x-UltraSharp": "https://huggingface.co/Shandypur/ESRGAN-4x-UltraSharp/resolve/main/4x-UltraSharp.pth",
251
+ "4x_foolhardy_Remacri": "https://huggingface.co/FacehugmanIII/4x_foolhardy_Remacri/resolve/main/4x_foolhardy_Remacri.pth",
252
+ "Remacri4xExtraSmoother": "https://huggingface.co/hollowstrawberry/upscalers-backup/resolve/main/ESRGAN/Remacri%204x%20ExtraSmoother.pth",
253
+ "AnimeSharp4x": "https://huggingface.co/hollowstrawberry/upscalers-backup/resolve/main/ESRGAN/AnimeSharp%204x.pth",
254
+ "lollypop": "https://huggingface.co/hollowstrawberry/upscalers-backup/resolve/main/ESRGAN/lollypop.pth",
255
+ "RealisticRescaler4x": "https://huggingface.co/hollowstrawberry/upscalers-backup/resolve/main/ESRGAN/RealisticRescaler%204x.pth",
256
+ "NickelbackFS4x": "https://huggingface.co/hollowstrawberry/upscalers-backup/resolve/main/ESRGAN/NickelbackFS%204x.pth"
257
+ }
258
+
259
+ UPSCALER_KEYS = list(UPSCALER_DICT_GUI.keys())
260
+
261
+ PROMPT_W_OPTIONS = [
262
+ ("Compel format: (word)weight", "Compel"),
263
+ ("Classic format: (word:weight)", "Classic"),
264
+ ("Classic-original format: (word:weight)", "Classic-original"),
265
+ ("Classic-no_norm format: (word:weight)", "Classic-no_norm"),
266
+ ("Classic-ignore", "Classic-ignore"),
267
+ ("None", "None"),
268
+ ]
269
+
270
+ WARNING_MSG_VAE = (
271
+ "Use the right VAE for your model to maintain image quality. The wrong"
272
+ " VAE can lead to poor results, like blurriness in the generated images."
273
+ )
274
+
275
+ SDXL_TASK = [k for k, v in TASK_STABLEPY.items() if v in SDXL_TASKS]
276
+ SD_TASK = [k for k, v in TASK_STABLEPY.items() if v in SD15_TASKS]
277
+ FLUX_TASK = list(TASK_STABLEPY.keys())[:3] + [k for k, v in TASK_STABLEPY.items() if v in FLUX_CN_UNION_MODES.keys()]
278
+
279
+ MODEL_TYPE_TASK = {
280
+ "SD 1.5": SD_TASK,
281
+ "SDXL": SDXL_TASK,
282
+ "FLUX": FLUX_TASK,
283
+ }
284
+
285
+ MODEL_TYPE_CLASS = {
286
+ "diffusers:StableDiffusionPipeline": "SD 1.5",
287
+ "diffusers:StableDiffusionXLPipeline": "SDXL",
288
+ "diffusers:FluxPipeline": "FLUX",
289
+ }
290
+
291
+ POST_PROCESSING_SAMPLER = ["Use same sampler"] + scheduler_names[:-2]
292
+
293
+ SUBTITLE_GUI = (
294
+ "### This demo uses [diffusers](https://github.com/huggingface/diffusers)"
295
+ " to perform different tasks in image generation."
296
+ )
297
+
298
+ HELP_GUI = (
299
+ """### Help:
300
+ - The current space runs on a ZERO GPU which is assigned for approximately 60 seconds; Therefore, if you submit expensive tasks, the operation may be canceled upon reaching the maximum allowed time with 'GPU TASK ABORTED'.
301
+ - Distorted or strange images often result from high prompt weights, so it's best to use low weights and scales, and consider using Classic variants like 'Classic-original'.
302
+ - For better results with Pony Diffusion, try using sampler DPM++ 1s or DPM2 with Compel or Classic prompt weights.
303
+ """
304
+ )
305
+
306
+ EXAMPLES_GUI_HELP = (
307
+ """### The following examples perform specific tasks:
308
+ 1. Generation with SDXL and upscale
309
+ 2. Generation with FLUX dev
310
+ 3. ControlNet Canny SDXL
311
+ 4. Optical pattern (Optical illusion) SDXL
312
+ 5. Convert an image to a coloring drawing
313
+ 6. ControlNet OpenPose SD 1.5 and Latent upscale
314
+
315
+ - Different tasks can be performed, such as img2img or using the IP adapter, to preserve a person's appearance or a specific style based on an image.
316
+ """
317
+ )
318
+
319
+ EXAMPLES_GUI = [
320
+ [
321
+ "splatter paint theme, 1girl, frame center, pretty face, face with artistic paint artwork, feminism, long hair, upper body view, futuristic expression illustrative painted background, origami, stripes, explosive paint splashes behind her, hand on cheek pose, strobe lighting, masterpiece photography creative artwork, golden morning light, highly detailed, masterpiece, best quality, very aesthetic, absurdres",
322
+ "logo, artist name, (worst quality, normal quality), bad-artist, ((bad anatomy)), ((bad hands)), ((bad proportions)), ((duplicate limbs)), ((fused limbs)), ((interlocking fingers)), ((poorly drawn face)), high contrast., score_6, score_5, score_4, lowres, (bad), text, error, fewer, extra, missing, worst quality, jpeg artifacts, low quality, watermark, unfinished, displeasing, oldest, early, chromatic aberration, signature, extra digits, artistic error, username, scan, [abstract]",
323
+ 28,
324
+ 5.0,
325
+ -1,
326
+ "None",
327
+ 0.33,
328
+ "DPM++ 2M SDE",
329
+ 1152,
330
+ 896,
331
+ "John6666/noobai-xl-nai-xl-epsilonpred10version-sdxl",
332
+ "txt2img",
333
+ "image.webp", # img conttol
334
+ 1024, # img resolution
335
+ 0.35, # strength
336
+ 1.0, # cn scale
337
+ 0.0, # cn start
338
+ 1.0, # cn end
339
+ "Classic",
340
+ "Nearest",
341
+ 45,
342
+ False,
343
+ ],
344
+ [
345
+ "a digital illustration of a movie poster titled 'Finding Emo', finding nemo parody poster, featuring a depressed cartoon clownfish with black emo hair, eyeliner, and piercings, bored expression, swimming in a dark underwater scene, in the background, movie title in a dripping, grungy font, moody blue and purple color palette",
346
+ "",
347
+ 24,
348
+ 3.5,
349
+ -1,
350
+ "None",
351
+ 0.33,
352
+ "FlowMatchEuler",
353
+ 1152,
354
+ 896,
355
+ "black-forest-labs/FLUX.1-dev",
356
+ "txt2img",
357
+ None, # img conttol
358
+ 1024, # img resolution
359
+ 0.35, # strength
360
+ 1.0, # cn scale
361
+ 0.0, # cn start
362
+ 1.0, # cn end
363
+ "Classic",
364
+ None,
365
+ 70,
366
+ True,
367
+ ],
368
+ [
369
+ "((masterpiece)), best quality, blonde disco girl, detailed face, realistic face, realistic hair, dynamic pose, pink pvc, intergalactic disco background, pastel lights, dynamic contrast, airbrush, fine detail, 70s vibe, midriff",
370
+ "(worst quality:1.2), (bad quality:1.2), (poor quality:1.2), (missing fingers:1.2), bad-artist-anime, bad-artist, bad-picture-chill-75v",
371
+ 48,
372
+ 3.5,
373
+ -1,
374
+ "None",
375
+ 0.33,
376
+ "DPM++ 2M SDE Lu",
377
+ 1024,
378
+ 1024,
379
+ "John6666/epicrealism-xl-v10kiss2-sdxl",
380
+ "canny ControlNet",
381
+ "image.webp", # img conttol
382
+ 1024, # img resolution
383
+ 0.35, # strength
384
+ 1.0, # cn scale
385
+ 0.0, # cn start
386
+ 1.0, # cn end
387
+ "Classic",
388
+ None,
389
+ 44,
390
+ False,
391
+ ],
392
+ [
393
+ "cinematic scenery old city ruins",
394
+ "(worst quality, low quality, illustration, 3d, 2d, painting, cartoons, sketch), (illustration, 3d, 2d, painting, cartoons, sketch, blurry, film grain, noise), (low quality, worst quality:1.2)",
395
+ 50,
396
+ 4.0,
397
+ -1,
398
+ "None",
399
+ 0.33,
400
+ "Euler a",
401
+ 1024,
402
+ 1024,
403
+ "SG161222/RealVisXL_V5.0",
404
+ "optical pattern ControlNet",
405
+ "spiral_no_transparent.png", # img conttol
406
+ 1024, # img resolution
407
+ 0.35, # strength
408
+ 1.0, # cn scale
409
+ 0.05, # cn start
410
+ 0.75, # cn end
411
+ "Classic",
412
+ None,
413
+ 35,
414
+ False,
415
+ ],
416
+ [
417
+ "black and white, line art, coloring drawing, clean line art, black strokes, no background, white, black, free lines, black scribbles, on paper, A blend of comic book art and lineart full of black and white color, masterpiece, high-resolution, trending on Pixiv fan box, palette knife, brush strokes, two-dimensional, planar vector, T-shirt design, stickers, and T-shirt design, vector art, fantasy art, Adobe Illustrator, hand-painted, digital painting, low polygon, soft lighting, aerial view, isometric style, retro aesthetics, 8K resolution, black sketch lines, monochrome, invert color",
418
+ "color, red, green, yellow, colored, duplicate, blurry, abstract, disfigured, deformed, animated, toy, figure, framed, 3d, bad art, poorly drawn, extra limbs, close up, b&w, weird colors, blurry, watermark, blur haze, 2 heads, long neck, watermark, elongated body, cropped image, out of frame, draft, deformed hands, twisted fingers, double image, malformed hands, multiple heads, extra limb, ugly, poorly drawn hands, missing limb, cut-off, over satured, grain, lowères, bad anatomy, poorly drawn face, mutation, mutated, floating limbs, disconnected limbs, out of focus, long body, disgusting, extra fingers, groos proportions, missing arms, mutated hands, cloned face, missing legs, ugly, tiling, poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame, extra limbs, disfigured, deformed, body out of frame, blurry, bad anatomy, blurred, watermark, grainy, signature, cut off, draft, deformed, blurry, bad anatomy, disfigured, poorly drawn face, mutation, bluelish, blue",
419
+ 20,
420
+ 4.0,
421
+ -1,
422
+ "loras/Coloring_book_-_LineArt.safetensors",
423
+ 1.0,
424
+ "DPM++ 2M SDE",
425
+ 1024,
426
+ 1024,
427
+ "eienmojiki/Anything-XL",
428
+ "lineart ControlNet",
429
+ "color_image.png", # img conttol
430
+ 896, # img resolution
431
+ 0.35, # strength
432
+ 1.0, # cn scale
433
+ 0.0, # cn start
434
+ 1.0, # cn end
435
+ "Compel",
436
+ None,
437
+ 35,
438
+ False,
439
+ ],
440
+ [
441
+ "1girl,face,curly hair,red hair,white background,",
442
+ "(worst quality:2),(low quality:2),(normal quality:2),lowres,watermark,",
443
+ 38,
444
+ 5.0,
445
+ -1,
446
+ "None",
447
+ 0.33,
448
+ "DPM++ 2M SDE",
449
+ 512,
450
+ 512,
451
+ "digiplay/majicMIX_realistic_v7",
452
+ "openpose ControlNet",
453
+ "image.webp", # img conttol
454
+ 1024, # img resolution
455
+ 0.35, # strength
456
+ 1.0, # cn scale
457
+ 0.0, # cn start
458
+ 0.9, # cn end
459
+ "Compel",
460
+ "Latent (antialiased)",
461
+ 46,
462
+ False,
463
+ ],
464
+ ]
465
+
466
+ RESOURCES = (
467
+ """### Resources
468
+ - John6666's space has some great features you might find helpful [link](https://huggingface.co/spaces/John6666/DiffuseCraftMod).
469
+ - You can also try the image generator in Colab’s free tier, which provides free GPU [link](https://github.com/R3gm/SD_diffusers_interactive).
470
+ """
471
+ )