zerhero commited on
Commit
7b7018c
1 Parent(s): 32001b2

change base model

Browse files
Files changed (3) hide show
  1. app.py +2 -25
  2. config.py +25 -0
  3. gui.py +1 -1
app.py CHANGED
@@ -21,7 +21,8 @@ from config import (
21
  MINIMUM_IMAGE_NUMBER,
22
  MAXIMUM_IMAGE_NUMBER,
23
  DEFAULT_NEGATIVE_PROMPT,
24
- DEFAULT_POSITIVE_PROMPT
 
25
  )
26
  from models.vae import VAE_LIST as download_vae
27
  from models.checkpoints import CHECKPOINT_LIST as download_model
@@ -34,30 +35,6 @@ from examples.examples import example_prompts
34
  from utils.download_utils import download_things
35
  from utils.model_utils import get_model_list
36
 
37
- task_stablepy: dict = {
38
- 'txt2img': 'txt2img',
39
- 'img2img': 'img2img',
40
- 'inpaint': 'inpaint',
41
- # 'canny T2I Adapter': 'sdxl_canny_t2i', # NO HAVE STEP CALLBACK PARAMETERS SO NOT WORKS WITH DIFFUSERS 0.29.0
42
- # 'sketch T2I Adapter': 'sdxl_sketch_t2i',
43
- # 'lineart T2I Adapter': 'sdxl_lineart_t2i',
44
- # 'depth-midas T2I Adapter': 'sdxl_depth-midas_t2i',
45
- # 'openpose T2I Adapter': 'sdxl_openpose_t2i',
46
- 'openpose ControlNet': 'openpose',
47
- 'canny ControlNet': 'canny',
48
- 'mlsd ControlNet': 'mlsd',
49
- 'scribble ControlNet': 'scribble',
50
- 'softedge ControlNet': 'softedge',
51
- 'segmentation ControlNet': 'segmentation',
52
- 'depth ControlNet': 'depth',
53
- 'normalbae ControlNet': 'normalbae',
54
- 'lineart ControlNet': 'lineart',
55
- # 'lineart_anime ControlNet': 'lineart_anime',
56
- 'shuffle ControlNet': 'shuffle',
57
- 'ip2p ControlNet': 'ip2p',
58
- 'optical pattern ControlNet': 'pattern',
59
- 'tile realistic': 'sdxl_tile_realistic',
60
- }
61
  # LOAD ALL ENV TOKEN
62
  CIVITAI_API_KEY: str = os.environ.get("CIVITAI_API_KEY")
63
  hf_token: str = os.environ.get("HF_TOKEN")
 
21
  MINIMUM_IMAGE_NUMBER,
22
  MAXIMUM_IMAGE_NUMBER,
23
  DEFAULT_NEGATIVE_PROMPT,
24
+ DEFAULT_POSITIVE_PROMPT,
25
+ task_stablepy
26
  )
27
  from models.vae import VAE_LIST as download_vae
28
  from models.checkpoints import CHECKPOINT_LIST as download_model
 
35
  from utils.download_utils import download_things
36
  from utils.model_utils import get_model_list
37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  # LOAD ALL ENV TOKEN
39
  CIVITAI_API_KEY: str = os.environ.get("CIVITAI_API_KEY")
40
  hf_token: str = os.environ.get("HF_TOKEN")
config.py CHANGED
@@ -28,3 +28,28 @@ cross eyed, cloned face, bad symmetry, bad anatomy, low quality, blurry, text, w
28
  signature, jpeg, artifacts, monochrome, paintings, oil, (hands:1.15), European Woman, woman,
29
  noise, dark skin, (3d), By bad artist -neg,bhands-neg, canvas frame, (badly drawn), (badly painted),
30
  """
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  signature, jpeg, artifacts, monochrome, paintings, oil, (hands:1.15), European Woman, woman,
29
  noise, dark skin, (3d), By bad artist -neg,bhands-neg, canvas frame, (badly drawn), (badly painted),
30
  """
31
+
32
+ task_stablepy: dict = {
33
+ 'txt2img': 'txt2img',
34
+ 'img2img': 'img2img',
35
+ 'inpaint': 'inpaint',
36
+ # 'canny T2I Adapter': 'sdxl_canny_t2i', # NO HAVE STEP CALLBACK PARAMETERS SO NOT WORKS WITH DIFFUSERS 0.29.0
37
+ # 'sketch T2I Adapter': 'sdxl_sketch_t2i',
38
+ # 'lineart T2I Adapter': 'sdxl_lineart_t2i',
39
+ # 'depth-midas T2I Adapter': 'sdxl_depth-midas_t2i',
40
+ # 'openpose T2I Adapter': 'sdxl_openpose_t2i',
41
+ 'openpose ControlNet': 'openpose',
42
+ 'canny ControlNet': 'canny',
43
+ 'mlsd ControlNet': 'mlsd',
44
+ 'scribble ControlNet': 'scribble',
45
+ 'softedge ControlNet': 'softedge',
46
+ 'segmentation ControlNet': 'segmentation',
47
+ 'depth ControlNet': 'depth',
48
+ 'normalbae ControlNet': 'normalbae',
49
+ 'lineart ControlNet': 'lineart',
50
+ # 'lineart_anime ControlNet': 'lineart_anime',
51
+ 'shuffle ControlNet': 'shuffle',
52
+ 'ip2p ControlNet': 'ip2p',
53
+ 'optical pattern ControlNet': 'pattern',
54
+ 'tile realistic': 'sdxl_tile_realistic',
55
+ }
gui.py CHANGED
@@ -213,7 +213,7 @@ class GuiSD:
213
  print(la)
214
  lora_type = ("animetarot" in la.lower() or "Hyper-SD15-8steps".lower() in la.lower())
215
  if (model_is_xl and lora_type) or (not model_is_xl and not lora_type):
216
- msg_inc_lora = f'The LoRA {la} is for {'SD 1.5' if model_is_xl else 'SDXL'}, but you are using {model_type}.'
217
  gr.Info(msg_inc_lora)
218
  msg_lora.append(msg_inc_lora)
219
 
 
213
  print(la)
214
  lora_type = ("animetarot" in la.lower() or "Hyper-SD15-8steps".lower() in la.lower())
215
  if (model_is_xl and lora_type) or (not model_is_xl and not lora_type):
216
+ msg_inc_lora = f"The LoRA {la} is for {'SD 1.5' if model_is_xl else 'SDXL'}, but you are using {model_type}."
217
  gr.Info(msg_inc_lora)
218
  msg_lora.append(msg_inc_lora)
219