From 13e2661dff6bdad64e2de3225ed293caf868ab3e Mon Sep 17 00:00:00 2001 From: Isulion Date: Fri, 1 Nov 2024 11:53:40 +0100 Subject: [PATCH] Mega prompt chimera upadte --- .../mega_prompt_generator.cpython-312.pyc | Bin 13737 -> 14783 bytes Core_Nodes/mega_prompt_generator.py | 87 +++++++++++++----- __pycache__/__init__.cpython-312.pyc | Bin 4520 -> 4520 bytes 3 files changed, 66 insertions(+), 21 deletions(-) diff --git a/Core_Nodes/__pycache__/mega_prompt_generator.cpython-312.pyc b/Core_Nodes/__pycache__/mega_prompt_generator.cpython-312.pyc index 1e710336fad2a6c1676ef3deec821c3c4bf247ef..22b40e20f317f182857d307033556a9c5e669732 100644 GIT binary patch delta 3627 zcmaJ@TWk~A8J=+x+p)*76X)tnJdW=s7jh{H8wd>nHh?#fT_6xHS>u_+P8>Uo9ZJHO zWLv3A)vXkAS~V<1_@PpbsKD*Mxavbg+lQ!qnGhu0Db@0@FI1IaSC#r!^*>|B#PO<@ z=R0Tq`Oo+L|9|G3IS*(45UcvDMx!F&_ov_5ryd^oP1Su9S%H3SYE%S*p;?ymqd%Hj z$s_2E=`?xxi|?Ap$i~Ouy-a+gB#a}ZaQcF9kr7U@LenIA+?@0)MEOT&K0H41K6iyA zh;N0H@W2Cpb6j+GE-or!^H-?#B+FS6Iy7jtqGnoO&g&k*W1F5-qD^}p`kdCIC|$W!!|ND@M5Jdb`D#Yi1S9Ve zj0*bde4pZL?h*Ip3H1sY`DKxpW`|c5^cDFLT4{t*8u4QYRVOKgcZ90U1&ChQwIqcs zv{9qq`BaLr*($||)}2&7>aG_30HebqkMdb3>UcebTg}%3*6?)@XoVze09m~x`@wEv zvIf^_)mf#f-~9-I0{Xo}YpG-E`1%4ROh#m*$QKBV^-RN*Y&#GxRP_9fb-%4~2Bv|d zcw$*Q+cA>_FVDSF+_@5kf7(o%#uDqa-K1~g8zDLa-y}sx5WjCQkS1$Wbjj=@SUk>RF=rA!x-T;~=-YC_@B)yNC$d`p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bV-w};8Y|=x-HmE70p3!yX3uIPB19t0TVn+ zda4p>t0C#-+F%OhnT4a(TTY=zB7@fkSP1AAoHZGo)eNL=p{w$mD%zZ?bZT$9I2R|M zlTBa&{}?j_FF6L@4j6L*Sz{2u-v@uZbp{&0>_h&u$ghL2rjC+iBArOl(WH~HKu^FV zDwrrurk2Ed^qZj5q9PVgC1R9V$3$ZkE2`nOJV&uCe2W#8v1BS8PtfzCBD%ax(WIzK zQ?WRmN~Y#lMNMoaP0dE>#8Ncb!ix1pixnGQrQ*?Ri4?d@a*jEV;u=N} zLJ$T6UA93{6@&i*DVn0wtSCnzh^priFmbq3lp{?Tfg~gR6=P8A*YJkEFU7QxrIV|WQzj~#rzXvu2$P%fUE7JS3o zh7cf+9WiN)yBhnZ#-1@|lv!D}H+x8MoY>Z!1fLzd;4DdJhO!-53x6Uvn(NOu<-7Af z!F_Ru7zZug5pQXe;OWf`<$@cBgz#j3Rk(arn4J@@&I|7N4v_$Nx`UN;{;Zkr$o1tq z^LXBqHwy0XHgOUB)ZOJS2V~Buvpu|@H|M;9;8_W`z^UWCmXazA&6hRtE&L6B zL2wW35NE)h2`<_c`?SU^#n1vCcIEK~yU2lwAfqLoDiO9%ppKW zi=h#u5Tp^jhJZn^g5Vm0>j;(++(58^fJLwhK~%?*QI=hz((x3@%pi|ud?<2hd~7x{ z6&{)pfe>`JqjShyMu37Yo=rI#RRm~e*^x&rC;T{v8GN@#3wi`P^X=h+&VGCN$*JB# zPjBI5f5GYfy*`51If^Xk-GGdVAx4R;T0m6xEv3knB-PKn54XTC#u^~(?Za{W2Tc2i Od`5;lo?-|k!hZmmhIR%3 diff --git a/Core_Nodes/mega_prompt_generator.py b/Core_Nodes/mega_prompt_generator.py index 8975d87..e920432 100644 --- a/Core_Nodes/mega_prompt_generator.py +++ b/Core_Nodes/mega_prompt_generator.py @@ -52,7 +52,7 @@ class IsulionMegaPromptGenerator: def INPUT_TYPES(s): return { "required": { - "theme": (["fantasy", "sci_fi", "modern", "mixed"], {"default": "fantasy"}), + "theme": (["fantasy", "sci_fi", "modern", "mixed", "chimera"], {"default": "fantasy"}), "complexity": (["simple", "detailed", "complex"], {"default": "detailed"}), "randomize": (["enable", "disable"], {"default": "enable"}), }, @@ -66,8 +66,24 @@ class IsulionMegaPromptGenerator: } } - RETURN_TYPES = ("STRING", "INT",) - RETURN_NAMES = ("prompt", "seed",) + RETURN_TYPES = ( + "STRING", # combined prompt + "STRING", # subject + "STRING", # action + "STRING", # environment + "STRING", # style + "STRING", # effects + "INT", # seed + ) + RETURN_NAMES = ( + "prompt", + "subject", + "action", + "environment", + "style", + "effects", + "seed", + ) FUNCTION = "generate" CATEGORY = "Isulion/Core" @@ -79,33 +95,51 @@ class IsulionMegaPromptGenerator: seed = random.randint(0, 0xffffffffffffffff) if seed == 0 else seed components = [] + subject_text = "" + action_text = "" + environment_text = "" + style_text = "" + effects_text = "" # Subject generation if include_subject == "yes": - if theme == "fantasy": + if theme == "chimera": + # Create cute chimera by combining 2-3 animals + num_parts = random.randint(2, 3) + animal_parts = random.sample(self.cute_animals, num_parts) + behavior = random.choice(self.behaviors) + + if num_parts == 2: + subject_text = f"cute hybrid creature with {animal_parts[0]} head and {animal_parts[1]} body, {behavior}" + else: + subject_text = f"cute hybrid creature with {animal_parts[0]} head, {animal_parts[1]} body, and {animal_parts[2]} tail, {behavior}" + + elif theme == "fantasy": race = random.choice(self.races) profession = random.choice(self.professions) clothing = random.choice(self.clothing["fantasy"]) - components.append(f"{race} {profession} wearing {clothing}") + subject_text = f"{race} {profession} wearing {clothing}" elif theme == "sci_fi": tech = random.choice(self.technology["augments"]) clothing = random.choice(self.clothing["sci_fi"]) - components.append(f"futuristic character with {tech} wearing {clothing}") + subject_text = f"futuristic character with {tech} wearing {clothing}" else: # modern or mixed if random.choice([True, False]): animal = random.choice(self.cute_animals if random.random() < 0.3 else self.animals) behavior = random.choice(self.behaviors) - components.append(f"{animal} {behavior}") + subject_text = f"{animal} {behavior}" else: profession = random.choice(self.professions) clothing = random.choice(self.clothing["modern"]) - components.append(f"{profession} wearing {clothing}") + subject_text = f"{profession} wearing {clothing}" + components.append(subject_text) # Action and composition if include_action == "yes": action = random.choice(self.actions) composition = random.choice(self.compositions) - components.append(f"{action}, {composition}") + action_text = f"{action}, {composition}" + components.append(action_text) # Environment if include_environment == "yes": @@ -113,46 +147,57 @@ class IsulionMegaPromptGenerator: location = random.choice(self.mythical_locations) weather_cond = random.choice(self.weather) time = random.choice(self.times) - components.append(f"in a {location} during {weather_cond} {time}") + environment_text = f"in a {location} during {weather_cond} {time}" elif theme == "sci_fi": atmos = random.choice(self.alien_world_elements["atmospheres"]) terrain = random.choice(self.alien_world_elements["terrains"]) feature = random.choice(self.alien_world_elements["features"]) - components.append(f"on an alien world with {atmos} atmosphere, {terrain}, and {feature}") + environment_text = f"on an alien world with {atmos} atmosphere, {terrain}, and {feature}" else: habitat = random.choice(self.habitats) weather_cond = random.choice(self.weather) time = random.choice(self.times) - components.append(f"in a {habitat} during {weather_cond} {time}") + environment_text = f"in a {habitat} during {weather_cond} {time}" + components.append(environment_text) # Style and mood if include_style == "yes": art_style = random.choice(self.art_styles) emotion = random.choice(self.emotions) - components.append(f"{art_style} with {emotion} mood") + style_text = f"{art_style} with {emotion} mood" + components.append(style_text) # Special effects if include_effects == "yes": if theme == "fantasy": - effect = random.choice(self.magical_effects["fire"]) # Randomly choose effect type - artifact = random.choice(self.artifacts["weapon"]) # Randomly choose artifact type - components.append(f"with {effect} and {artifact}") + effect = random.choice(self.magical_effects["fire"]) + artifact = random.choice(self.artifacts["weapon"]) + effects_text = f"with {effect} and {artifact}" elif theme == "sci_fi": - tech = random.choice(self.technology["weapons"]) # Randomly choose tech type - ship = random.choice(self.spacecraft["military"]) # Randomly choose ship type - components.append(f"with {tech} and {ship} in background") + tech = random.choice(self.technology["weapons"]) + ship = random.choice(self.spacecraft["military"]) + effects_text = f"with {tech} and {ship} in background" + else: # modern or mixed + if random.choice([True, False]): + effect = random.choice(self.magical_effects["nature"]) + effects_text = f"with {effect}" + else: + art = random.choice(self.artifacts["jewelry"]) + effects_text = f"with {art}" + components.append(effects_text) # Adjust detail level based on complexity if complexity == "simple": components = components[:3] elif complexity == "complex": - # Add extra details based on theme if theme == "fantasy": extra_effect = random.choice(self.magical_effects["ice"]) + effects_text += f", additional {extra_effect}" components.append(f"additional {extra_effect}") elif theme == "sci_fi": extra_tech = random.choice(self.technology["gadgets"]) + effects_text += f", additional {extra_tech}" components.append(f"additional {extra_tech}") prompt = ", ".join(components) - return (prompt, seed) \ No newline at end of file + return (prompt, subject_text, action_text, environment_text, style_text, effects_text, seed) \ No newline at end of file diff --git a/__pycache__/__init__.cpython-312.pyc b/__pycache__/__init__.cpython-312.pyc index 5c1134a1b07cd870f09ecad259e635bea7934b1d..bf31e018db5219a444a789eda6a9c29dde1df6ef 100644 GIT binary patch delta 22 ccmZ3Xyh54xG%qg~0}w3Rq>^5=k$1Kr07lvdQUCw| delta 22 ccmZ3Xyh54xG%qg~0}zO>S4ls-k$1Kr07Fm)5dZ)H