John6666 commited on
Commit
980e454
β€’
1 Parent(s): 82042fc

Upload 3 files

Browse files
Files changed (3) hide show
  1. genimage.py +1 -1
  2. llmdolphin.py +1 -0
  3. tagger.py +12 -6
genimage.py CHANGED
@@ -45,7 +45,7 @@ def generate_image(prompt, neg_prompt):
45
  try:
46
  images = pipe(
47
  prompt=prompt,
48
- prompt_2="anime artwork, anime style, studio anime, highly detailed, masterpiece, best quality, very aesthetic, absurdres",
49
  negative_prompt=neg_prompt,
50
  negative_prompt_2="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], photo, deformed, disfigured, low contrast, photo, deformed, disfigured, low contrast",
51
  width=1024,
 
45
  try:
46
  images = pipe(
47
  prompt=prompt,
48
+ prompt_2="masterpiece, best quality, very aesthetic, absurdres",
49
  negative_prompt=neg_prompt,
50
  negative_prompt_2="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], photo, deformed, disfigured, low contrast, photo, deformed, disfigured, low contrast",
51
  width=1024,
llmdolphin.py CHANGED
@@ -16,6 +16,7 @@ llm_models = {
16
  "suzume-llama-3-8B-japanese.Q4_K_M.gguf": ["PrunaAI/lightblue-suzume-llama-3-8B-japanese-GGUF-smashed", MessagesFormatterType.LLAMA_3],
17
  "suzume-llama-3-8B-multilingual-orpo-borda-top25.Q4_K_M.gguf": ["RichardErkhov/lightblue_-_suzume-llama-3-8B-multilingual-orpo-borda-top25-gguf", MessagesFormatterType.LLAMA_3],
18
  "Bungo-L3-8B.Q5_K_M.gguf": ["backyardai/Bungo-L3-8B-GGUF", MessagesFormatterType.LLAMA_3],
 
19
  "Mistral-Nemo-Instruct-2407-Q4_K_M.gguf": ["bartowski/Mistral-Nemo-Instruct-2407-GGUF", MessagesFormatterType.MISTRAL],
20
  "ghost-8b-beta.q5_k.gguf": ["ZeroWw/ghost-8b-beta-GGUF", MessagesFormatterType.MISTRAL],
21
  "Honey-Yuzu-13B.Q4_K_M.gguf": ["backyardai/Honey-Yuzu-13B-GGUF", MessagesFormatterType.MISTRAL],
 
16
  "suzume-llama-3-8B-japanese.Q4_K_M.gguf": ["PrunaAI/lightblue-suzume-llama-3-8B-japanese-GGUF-smashed", MessagesFormatterType.LLAMA_3],
17
  "suzume-llama-3-8B-multilingual-orpo-borda-top25.Q4_K_M.gguf": ["RichardErkhov/lightblue_-_suzume-llama-3-8B-multilingual-orpo-borda-top25-gguf", MessagesFormatterType.LLAMA_3],
18
  "Bungo-L3-8B.Q5_K_M.gguf": ["backyardai/Bungo-L3-8B-GGUF", MessagesFormatterType.LLAMA_3],
19
+ "L3-8B-Tamamo-v1.i1-Q5_K_M.gguf": ["mradermacher/L3-8B-Tamamo-v1-i1-GGUF", MessagesFormatterType.LLAMA_3],
20
  "Mistral-Nemo-Instruct-2407-Q4_K_M.gguf": ["bartowski/Mistral-Nemo-Instruct-2407-GGUF", MessagesFormatterType.MISTRAL],
21
  "ghost-8b-beta.q5_k.gguf": ["ZeroWw/ghost-8b-beta-GGUF", MessagesFormatterType.MISTRAL],
22
  "Honey-Yuzu-13B.Q4_K_M.gguf": ["backyardai/Honey-Yuzu-13B-GGUF", MessagesFormatterType.MISTRAL],
tagger.py CHANGED
@@ -62,9 +62,15 @@ def list_uniq(l):
62
 
63
 
64
  def load_dict_from_csv(filename):
65
- with open(filename, 'r', encoding="utf-8") as f:
66
- lines = f.readlines()
67
  dict = {}
 
 
 
 
 
 
 
68
  for line in lines:
69
  parts = line.strip().split(',')
70
  dict[parts[0]] = parts[1]
@@ -242,13 +248,13 @@ def convert_tags_to_ja(input_prompt: str = ""):
242
  enable_auto_recom_prompt = True
243
 
244
 
245
- animagine_ps = to_list("anime artwork, anime style, studio anime, highly detailed, masterpiece, best quality, very aesthetic, absurdres")
246
  animagine_nps = to_list("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]")
247
- pony_ps = to_list("source_anime, score_9, score_8_up, score_7_up, masterpiece, best quality, very aesthetic, absurdres")
248
- pony_nps = to_list("source_pony, source_furry, source_cartoon, score_6, score_5, score_4, busty, ugly face, mutated hands, low res, blurry face, black and white, the simpsons, overwatch, apex legends")
249
  other_ps = to_list("anime artwork, anime style, studio anime, highly detailed, cinematic photo, 35mm photograph, film, bokeh, professional, 4k, highly detailed")
250
  other_nps = to_list("photo, deformed, black and white, realism, disfigured, low contrast, drawing, painting, crayon, sketch, graphite, impressionist, noisy, blurry, soft, deformed, ugly")
251
- default_ps = to_list("score_9, score_8_up, score_7_up, highly detailed, masterpiece, best quality, very aesthetic, absurdres")
252
  default_nps = to_list("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]")
253
  def insert_recom_prompt(prompt: str = "", neg_prompt: str = "", type: str = "None"):
254
  global enable_auto_recom_prompt
 
62
 
63
 
64
  def load_dict_from_csv(filename):
65
+ from pathlib import Path
 
66
  dict = {}
67
+ if not Path(filename).exists(): return dict
68
+ try:
69
+ with open(filename, 'r', encoding="utf-8") as f:
70
+ lines = f.readlines()
71
+ except Exception:
72
+ print(f"Failed to open dictionary file: {filename}")
73
+ return dict
74
  for line in lines:
75
  parts = line.strip().split(',')
76
  dict[parts[0]] = parts[1]
 
248
  enable_auto_recom_prompt = True
249
 
250
 
251
+ animagine_ps = to_list("masterpiece, best quality, very aesthetic, absurdres")
252
  animagine_nps = to_list("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]")
253
+ pony_ps = to_list("score_9, score_8_up, score_7_up, masterpiece, best quality, very aesthetic, absurdres")
254
+ pony_nps = to_list("source_pony, score_6, score_5, score_4, busty, ugly face, mutated hands, low res, blurry face, black and white, the simpsons, overwatch, apex legends")
255
  other_ps = to_list("anime artwork, anime style, studio anime, highly detailed, cinematic photo, 35mm photograph, film, bokeh, professional, 4k, highly detailed")
256
  other_nps = to_list("photo, deformed, black and white, realism, disfigured, low contrast, drawing, painting, crayon, sketch, graphite, impressionist, noisy, blurry, soft, deformed, ugly")
257
+ default_ps = to_list("highly detailed, masterpiece, best quality, very aesthetic, absurdres")
258
  default_nps = to_list("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]")
259
  def insert_recom_prompt(prompt: str = "", neg_prompt: str = "", type: str = "None"):
260
  global enable_auto_recom_prompt