baiango commited on
Commit
a5ad31b
1 Parent(s): 528532c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +18 -19
README.md CHANGED
@@ -22,13 +22,14 @@ import functools
22
  class REMSleepPrmAnime:
23
  def __init__(self):
24
  # Time
25
- self.year_range = {"both": {"newest", "recent", "mid", "early", "oldest"}}
26
 
27
  # --- Subject
28
  # Head
29
  self.haircuts = {"both": {"bob", "pixie", "cut", "shaggy", "layers", "mullet", "afro", "fringe", "bangs", "quiff", "undercut", "braids", "knot", "ponytail", "curls", "blunt", "perm", "fade", "crop", "bowl", "curtain", "top", "balayage", "shag", "bang", "waves"},
30
  "male": {"mohawk", "dreadlocks"}}
31
- self.eye_colors = {"both": {"blue", "red", "yellow", "green", "orange", "red-orange", "yellow-orange", "yellow-green", "blue-green"} | {"gray", "amber", "hazel", "gold", "silver"},
 
32
  "female": {"pink", "purple", "red-purple", "blue-purple"}}
33
  self.eye_shapes = {"both": {"normal", "large", "moe", "realistic", "cat", "wolf", "dog", "bird", "no irises", "heterochromia", "glowing", "small", "starburst pupils", "googly", "tearful", "chibi"}, "female": {"shoujo"}}
34
  self.blush = {"female": {"blush"}}
@@ -42,9 +43,9 @@ class REMSleepPrmAnime:
42
  "female": {"blush pink and white", "pink and red", "pink and orange", "gray and light pink", "dark green and pink", "pink and warm black", "pink and blue", "medium pink and red", "rose pink and periwinkle", "yellow and pink", "purple and pink", "pink and turquoise", "pink and green", "navy blue and pink", "purple and charcoal gray", "turquoise and purple", "purple and yellow", "electric purple and black", "purple and orange", "green and purple", "red and purple"}}
43
  self.tops = {"female": {"t-shirts", "blouses", "tunics", "camisoles", "tank tops", "crewneck", "v-neck", "cardigan", "turtleneck", "pullovers", "henleys", "crop tops", "off-the-shoulder tops", "cold shoulder tops", "peplum tops"}}
44
  self.bottoms = {"both": {"shorts", "chinos", "cargo pants"},
45
- "female": {"skinny jeans", "straight jeans", "bootcut jeans", "flare jeans", "wide-leg jeans", "bermuda shorts", "hotpants", "A-line skirts", "pencil skirts", "maxi skirts", "midi skirts", "mini skirts", "dress pants", "linen pants", "capris"} | \
46
- {"stockings", "tights", "fishnets", "leggings", "yoga pants"}}
47
- self.one_piece = {"female": {"jumpsuits", "rompers", "swimsuits", "bodysuits"}}
48
 
49
  # Personality
50
  self.personality_traits = {"both": {"creative", "determined", "enthusiastic", "friendly", "generous", "humorous", "intelligent", "kind", "loyal", "motivated", "optimistic", "persistent", "resilient", "sincere", "thoughtful", "trustworthy", "versatile", "compassionate", "ambitious", "confident", "honest", "brave", "patient", "reliable", "adventurous", "charismatic", "gracious", "insightful", "perceptive", "resourceful", "selfless", "talented", "witty", "zealous"}}
@@ -61,8 +62,8 @@ class REMSleepPrmAnime:
61
  self.eras = {"both": {"meiji period", "edo period"}}
62
 
63
  # Styles
64
- self.resolution = {"both": {"sharp focus", "8k"}}
65
- self.lighting = {"both": {"rim lighting", "flat lighting", "cinematic lighting", "crepuscular rays"}}
66
 
67
  def main(self):
68
  def get_random_x(x, gender=["both"]):
@@ -78,7 +79,7 @@ class REMSleepPrmAnime:
78
 
79
  commands = (
80
  # You must put trailing comma to convert a parenthesized expression into a tuple
81
- (self.year_range,),
82
  (self.personality_traits if rand50() else None,),
83
  (self.actions,),
84
 
@@ -91,25 +92,23 @@ class REMSleepPrmAnime:
91
  (self.earrings if rand50() else None,),
92
 
93
  (self.outfit_colors, "outfit",),
94
- *(((self.one_piece,),) if rand50() else ((self.tops,), (self.bottoms,))),
95
 
96
  (self.camera_angels, "shot",),
97
  ((self.places,) if rand85() else (self.eras,)),
98
 
99
  # ("masterpiece",), ("best quality",), ("very aesthetic",), ("absurdres",), # Already prepended
100
- (self.resolution if rand50() else None,),
101
- (self.lighting if rand50() else None,),
102
  )
103
 
104
- output = [gender] + [
105
- " ".join(
106
- get_random_x_by_gender(elem) if isinstance(elem, dict) else elem
107
- for elem in cmd
108
- if elem is not None and isinstance(elem, (str, dict))
109
- ) for cmd in commands
110
- ]
111
 
112
- return ", ".join([s for s in output if s != ""])
113
 
114
  if __name__ == "__main__":
115
  prompt_generator = REMSleepPrmAnime()
 
22
  class REMSleepPrmAnime:
23
  def __init__(self):
24
  # Time
25
+ self.year_ranges = {"both": {"newest", "recent", "mid", "early", "oldest"}}
26
 
27
  # --- Subject
28
  # Head
29
  self.haircuts = {"both": {"bob", "pixie", "cut", "shaggy", "layers", "mullet", "afro", "fringe", "bangs", "quiff", "undercut", "braids", "knot", "ponytail", "curls", "blunt", "perm", "fade", "crop", "bowl", "curtain", "top", "balayage", "shag", "bang", "waves"},
30
  "male": {"mohawk", "dreadlocks"}}
31
+ self.eye_colors = {"both": {"blue", "red", "yellow", "green", "orange", "red-orange", "yellow-orange", "yellow-green", "blue-green"} \
32
+ | {"gray", "amber", "hazel", "gold", "silver"},
33
  "female": {"pink", "purple", "red-purple", "blue-purple"}}
34
  self.eye_shapes = {"both": {"normal", "large", "moe", "realistic", "cat", "wolf", "dog", "bird", "no irises", "heterochromia", "glowing", "small", "starburst pupils", "googly", "tearful", "chibi"}, "female": {"shoujo"}}
35
  self.blush = {"female": {"blush"}}
 
43
  "female": {"blush pink and white", "pink and red", "pink and orange", "gray and light pink", "dark green and pink", "pink and warm black", "pink and blue", "medium pink and red", "rose pink and periwinkle", "yellow and pink", "purple and pink", "pink and turquoise", "pink and green", "navy blue and pink", "purple and charcoal gray", "turquoise and purple", "purple and yellow", "electric purple and black", "purple and orange", "green and purple", "red and purple"}}
44
  self.tops = {"female": {"t-shirts", "blouses", "tunics", "camisoles", "tank tops", "crewneck", "v-neck", "cardigan", "turtleneck", "pullovers", "henleys", "crop tops", "off-the-shoulder tops", "cold shoulder tops", "peplum tops"}}
45
  self.bottoms = {"both": {"shorts", "chinos", "cargo pants"},
46
+ "female": {"skinny jeans", "straight jeans", "bootcut jeans", "flare jeans", "wide-leg jeans", "bermuda shorts", "hotpants", "A-line skirts", "pencil skirts", "maxi skirts", "midi skirts", "mini skirts", "dress pants", "linen pants", "capris"} \
47
+ | {"stockings", "tights", "fishnets", "leggings", "yoga pants"}}
48
+ self.one_pieces = {"female": {"jumpsuits", "rompers", "swimsuits", "bodysuits"}}
49
 
50
  # Personality
51
  self.personality_traits = {"both": {"creative", "determined", "enthusiastic", "friendly", "generous", "humorous", "intelligent", "kind", "loyal", "motivated", "optimistic", "persistent", "resilient", "sincere", "thoughtful", "trustworthy", "versatile", "compassionate", "ambitious", "confident", "honest", "brave", "patient", "reliable", "adventurous", "charismatic", "gracious", "insightful", "perceptive", "resourceful", "selfless", "talented", "witty", "zealous"}}
 
62
  self.eras = {"both": {"meiji period", "edo period"}}
63
 
64
  # Styles
65
+ self.resolutions = {"both": {"sharp focus", "8k"}}
66
+ self.lightings = {"both": {"rim lighting", "flat lighting", "cinematic lighting", "crepuscular rays"}}
67
 
68
  def main(self):
69
  def get_random_x(x, gender=["both"]):
 
79
 
80
  commands = (
81
  # You must put trailing comma to convert a parenthesized expression into a tuple
82
+ (self.year_ranges,),
83
  (self.personality_traits if rand50() else None,),
84
  (self.actions,),
85
 
 
92
  (self.earrings if rand50() else None,),
93
 
94
  (self.outfit_colors, "outfit",),
95
+ *(((self.one_pieces,),) if rand50() else ((self.tops,), (self.bottoms,))),
96
 
97
  (self.camera_angels, "shot",),
98
  ((self.places,) if rand85() else (self.eras,)),
99
 
100
  # ("masterpiece",), ("best quality",), ("very aesthetic",), ("absurdres",), # Already prepended
101
+ (self.resolutions if rand50() else None,),
102
+ (self.lightings if rand50() else None,),
103
  )
104
 
105
+ output = [gender] + [" ".join(
106
+ get_random_x_by_gender(elem) if isinstance(elem, dict) else elem
107
+ for elem in cmd
108
+ if elem is not None and isinstance(elem, (str, dict))
109
+ ) for cmd in commands]
 
 
110
 
111
+ return ", ".join(filter(lambda s: s != "", output))
112
 
113
  if __name__ == "__main__":
114
  prompt_generator = REMSleepPrmAnime()