r3gm commited on
Commit
6ae5017
1 Parent(s): 9fc71c7

Update constants.py

Browse files
Files changed (1) hide show
  1. constants.py +69 -1
constants.py CHANGED
@@ -5,6 +5,8 @@ from stablepy import (
5
  SD15_TASKS,
6
  SDXL_TASKS,
7
  ALL_BUILTIN_UPSCALERS,
 
 
8
  )
9
 
10
  # - **Download Models**
@@ -19,6 +21,7 @@ DOWNLOAD_LORA = "https://huggingface.co/Leopain/color/resolve/main/Coloring_book
19
  LOAD_DIFFUSERS_FORMAT_MODEL = [
20
  'stabilityai/stable-diffusion-xl-base-1.0',
21
  'Laxhar/noobai-XL-1.1',
 
22
  'black-forest-labs/FLUX.1-dev',
23
  'John6666/blue-pencil-flux1-v021-fp8-flux',
24
  'John6666/wai-ani-flux-v10forfp8-fp8-flux',
@@ -125,6 +128,7 @@ LOAD_DIFFUSERS_FORMAT_MODEL = [
125
  'John6666/duchaiten-pony-real-v20-sdxl',
126
  'John6666/duchaiten-pony-xl-no-score-v70-sdxl',
127
  'Spestly/OdysseyXL-3.0',
 
128
  'KBlueLeaf/Kohaku-XL-Zeta',
129
  'cagliostrolab/animagine-xl-3.1',
130
  'yodayo-ai/kivotos-xl-2.0',
@@ -336,6 +340,20 @@ POST_PROCESSING_SAMPLER = ["Use same sampler"] + [
336
  name_s for name_s in scheduler_names if "Auto-Loader" not in name_s
337
  ]
338
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
339
  SUBTITLE_GUI = (
340
  "### This demo uses [diffusers](https://github.com/huggingface/diffusers)"
341
  " to perform different tasks in image generation."
@@ -356,7 +374,9 @@ EXAMPLES_GUI_HELP = (
356
  3. ControlNet Canny SDXL
357
  4. Optical pattern (Optical illusion) SDXL
358
  5. Convert an image to a coloring drawing
359
- 6. ControlNet OpenPose SD 1.5 and Latent upscale
 
 
360
 
361
  - 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.
362
  """
@@ -483,6 +503,54 @@ EXAMPLES_GUI = [
483
  35,
484
  False,
485
  ],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
486
  [
487
  "1girl,face,curly hair,red hair,white background,",
488
  "(worst quality:2),(low quality:2),(normal quality:2),lowres,watermark,",
 
5
  SD15_TASKS,
6
  SDXL_TASKS,
7
  ALL_BUILTIN_UPSCALERS,
8
+ IP_ADAPTERS_SD,
9
+ IP_ADAPTERS_SDXL,
10
  )
11
 
12
  # - **Download Models**
 
21
  LOAD_DIFFUSERS_FORMAT_MODEL = [
22
  'stabilityai/stable-diffusion-xl-base-1.0',
23
  'Laxhar/noobai-XL-1.1',
24
+ 'Laxhar/noobai-XL-Vpred-1.0',
25
  'black-forest-labs/FLUX.1-dev',
26
  'John6666/blue-pencil-flux1-v021-fp8-flux',
27
  'John6666/wai-ani-flux-v10forfp8-fp8-flux',
 
128
  'John6666/duchaiten-pony-real-v20-sdxl',
129
  'John6666/duchaiten-pony-xl-no-score-v70-sdxl',
130
  'Spestly/OdysseyXL-3.0',
131
+ 'Spestly/OdysseyXL-4.0',
132
  'KBlueLeaf/Kohaku-XL-Zeta',
133
  'cagliostrolab/animagine-xl-3.1',
134
  'yodayo-ai/kivotos-xl-2.0',
 
340
  name_s for name_s in scheduler_names if "Auto-Loader" not in name_s
341
  ]
342
 
343
+ IP_MODELS = []
344
+ ALL_IPA = sorted(set(IP_ADAPTERS_SD + IP_ADAPTERS_SDXL))
345
+
346
+ for origin_name in ALL_IPA:
347
+ suffixes = []
348
+ if origin_name in IP_ADAPTERS_SD:
349
+ suffixes.append("sd1.5")
350
+ if origin_name in IP_ADAPTERS_SDXL:
351
+ suffixes.append("sdxl")
352
+ ref_name = f"{origin_name} ({'/'.join(suffixes)})"
353
+ IP_MODELS.append((ref_name, origin_name))
354
+
355
+ MODE_IP_OPTIONS = ["original", "style", "layout", "style+layout"]
356
+
357
  SUBTITLE_GUI = (
358
  "### This demo uses [diffusers](https://github.com/huggingface/diffusers)"
359
  " to perform different tasks in image generation."
 
374
  3. ControlNet Canny SDXL
375
  4. Optical pattern (Optical illusion) SDXL
376
  5. Convert an image to a coloring drawing
377
+ 6. V prediction model inference
378
+ 7. V prediction model sd_embed variant inference
379
+ 8. ControlNet OpenPose SD 1.5 and Latent upscale
380
 
381
  - 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.
382
  """
 
503
  35,
504
  False,
505
  ],
506
+ [
507
+ "[mochizuki_shiina], [syuri22], newest, reimu, solo, outdoors, water, flower, lantern",
508
+ "worst quality, normal quality, old, sketch,",
509
+ 28,
510
+ 7.0,
511
+ -1,
512
+ "None",
513
+ 0.33,
514
+ "DPM 3M Ef",
515
+ 1600,
516
+ 1024,
517
+ "Laxhar/noobai-XL-Vpred-1.0",
518
+ "txt2img",
519
+ "color_image.png", # img conttol
520
+ 1024, # img resolution
521
+ 0.35, # strength
522
+ 1.0, # cn scale
523
+ 0.0, # cn start
524
+ 1.0, # cn end
525
+ "Classic",
526
+ None,
527
+ 30,
528
+ False,
529
+ ],
530
+ [
531
+ "[mochizuki_shiina], [syuri22], newest, multiple girls, 2girls, earrings, jewelry, gloves, purple eyes, black hair, looking at viewer, nail polish, hat, smile, open mouth, fingerless gloves, sleeveless, :d, upper body, blue eyes, closed mouth, black gloves, hands up, long hair, shirt, bare shoulders, white headwear, blush, black headwear, blue nails, upper teeth only, short hair, white gloves, white shirt, teeth, rabbit hat, star earrings, purple nails, pink hair, detached sleeves, fingernails, fake animal ears, animal hat, sleeves past wrists, black shirt, medium hair, fur trim, sleeveless shirt, turtleneck, long sleeves, rabbit ears, star \\(symbol\\)",
532
+ "worst quality, normal quality, old, sketch,",
533
+ 28,
534
+ 7.0,
535
+ -1,
536
+ "None",
537
+ 0.33,
538
+ "DPM 3M Ef",
539
+ 1600,
540
+ 1024,
541
+ "Laxhar/noobai-XL-Vpred-1.0",
542
+ "txt2img",
543
+ "color_image.png", # img conttol
544
+ 1024, # img resolution
545
+ 0.35, # strength
546
+ 1.0, # cn scale
547
+ 0.0, # cn start
548
+ 1.0, # cn end
549
+ "Classic-sd_embed",
550
+ None,
551
+ 30,
552
+ False,
553
+ ],
554
  [
555
  "1girl,face,curly hair,red hair,white background,",
556
  "(worst quality:2),(low quality:2),(normal quality:2),lowres,watermark,",