diff --git a/.cursorignore b/.cursorignore new file mode 100644 index 0000000..ed8ebf5 --- /dev/null +++ b/.cursorignore @@ -0,0 +1 @@ +__pycache__ \ No newline at end of file diff --git a/README.md b/README.md index e4de235..7ba548c 100644 --- a/README.md +++ b/README.md @@ -6,26 +6,44 @@ ComfyUI Nodes that generate prompts with the help of LLM from local or remote Ol -------------- -# Requirement : +# Requirement: -Recomanded environnement variables : +Recommended environment variables: - OLLAMA_KEEP_ALIVE 0 - OLLAMA_ORIGINS * -ComfyUI installed node : +ComfyUI installed node: - Ollama_generator -# Installation : +# Installation: - cd your_ComfyUI_install_dir - - cd custom_nodes - - git clone https://github.com/Isulion/ComfyUI_Isulion -------------- -# How to use : +# Available Nodes: + +## Core Generators +- Isulion Prompt Generator ✨ - Main prompt generation node +- Isulion Ollama Generate 🤖 - LLM-based text generation + +## Animal Related +- Isulion Animal Selector 🦁 - General animal selection +- Isulion Cute Animal Selector 🐱 - Cute and baby animal selection +- Isulion Animal Behavior Generator 🦊 - Animal actions and poses + +## Environment +- Isulion Habitat Generator 🌲 - Natural environments and landscapes +- Isulion Weather Generator ⛅ - Weather conditions +- Isulion Time of Day Generator 🌅 - Time and lighting conditions + +## Style and Mood +- Isulion Art Style Generator 🎨 - Artistic styles and techniques +- Isulion Emotion Generator 😊 - Emotional characteristics + +# How to use: Use this example workflow to get started: @@ -36,6 +54,4 @@ Advanced Mode for More Flexibility: ![Example_Isulion_Workflow_Split](https://github.com/user-attachments/assets/e578ff7a-0c03-47a1-900f-a7e209a64914) -Chimere Animals Workflow - -![workflowAnimals](https://github.com/user-attachments/assets/100cb116-c6ef-43cf-b5d3-d7782949ad9c) +# Chimera Animals Workflow: diff --git a/__init__.py b/__init__.py index bb8f6a2..e2c5a06 100644 --- a/__init__.py +++ b/__init__.py @@ -1,20 +1,36 @@ -from .isulion_prompt_generator import IsulionPromptGenerator -from .isulion_OllamaGenerate import OllamaGenerate -from .isulion_animal_generator import IsulionAnimalRandom -from .isulion_cute_animal_generator import IsulionCuteAnimalRandom - -NODE_CLASS_MAPPINGS = { - "IsulionPromptGenerator": IsulionPromptGenerator, - "OllamaGenerate": OllamaGenerate, - "AnimalGenerator": IsulionAnimalRandom, - "CuteAnimalGenerator": IsulionCuteAnimalRandom -} - -# Optional: Provide a custom display name for the node -NODE_DISPLAY_NAME_MAPPINGS = { - "IsulionPromptGenerator": "Isulion Prompt Generator", - "OllamaGenerate": "Isulion Ollama Generate", - "AnimalGenerator": "Isulion Animal Selector", - "AnimalGenerator": "Isulion Cute Animal Selector" - -} +from .isulion_prompt_generator import IsulionPromptGenerator +from .isulion_OllamaGenerate import OllamaGenerate +from .isulion_animal_generator import Isulion_AnimalRandom +from .isulion_cute_animal_generator import IsulionCuteAnimalRandom +from .isulion_emotion_generator import Isulion_EmotionGenerator +from .isulion_habitat_generator import Isulion_HabitatGenerator +from .isulion_weather_generator import Isulion_WeatherGenerator +from .isulion_time_of_day_generator import Isulion_TimeOfDayGenerator +from .isulion_art_style_generator import Isulion_ArtStyleGenerator +from .isulion_animal_behavior_generator import Isulion_AnimalBehaviorGenerator + +NODE_CLASS_MAPPINGS = { + "IsulionPromptGenerator": IsulionPromptGenerator, + "IsulionOllamaGenerate": OllamaGenerate, + "IsulionAnimalRandom": Isulion_AnimalRandom, + "IsulionCuteAnimalRandom": IsulionCuteAnimalRandom, + "IsulionEmotionGenerator": Isulion_EmotionGenerator, + "IsulionHabitatGenerator": Isulion_HabitatGenerator, + "IsulionWeatherGenerator": Isulion_WeatherGenerator, + "IsulionTimeOfDayGenerator": Isulion_TimeOfDayGenerator, + "IsulionArtStyleGenerator": Isulion_ArtStyleGenerator, + "IsulionAnimalBehaviorGenerator": Isulion_AnimalBehaviorGenerator +} + +NODE_DISPLAY_NAME_MAPPINGS = { + "IsulionPromptGenerator": "Isulion Prompt Generator ✨", + "IsulionOllamaGenerate": "Isulion Ollama Generate 🤖", + "IsulionAnimalRandom": "Isulion Animal Selector 🦁", + "IsulionCuteAnimalRandom": "Isulion Cute Animal Selector 🐱", + "IsulionEmotionGenerator": "Isulion Emotion Generator 😊", + "IsulionHabitatGenerator": "Isulion Habitat Generator 🌲", + "IsulionWeatherGenerator": "Isulion Weather Generator ⛅", + "IsulionTimeOfDayGenerator": "Isulion Time of Day Generator 🌅", + "IsulionArtStyleGenerator": "Isulion Art Style Generator 🎨", + "IsulionAnimalBehaviorGenerator": "Isulion Animal Behavior Generator 🦊" +} diff --git a/isulion_OllamaGenerate.py b/isulion_OllamaGenerate.py index 711a881..7c824af 100644 --- a/isulion_OllamaGenerate.py +++ b/isulion_OllamaGenerate.py @@ -1,50 +1,50 @@ -from ollama import Client - -class OllamaGenerate: - def __init__(self): - pass - - @classmethod - def INPUT_TYPES(cls): - return { - "required": { - "prompt": ("STRING", { - "multiline": True, - "default": "What is Art?" - }), - "url": ("STRING", { - "multiline": False, - "default": "http://127.0.0.1:11434" - }), - "model": ((), {}), - }, - } - - RETURN_TYPES = ("STRING",) - RETURN_NAMES = ("response",) - FUNCTION = "ollama_generate" - CATEGORY = "Ollama" - - def ollama_generate(self, prompt, url, model): - # Keep_alive is now hardcoded to 0 (not visible to user) - keep_alive = 0 - - client = Client(host=url) - - # Generate the response from the model - response = client.generate( - model=model, - prompt=prompt, - keep_alive=f"{keep_alive}m" # keep_alive is always 0 - ) - - return (response['response'],) - -# Register the node with your node mapping system -NODE_CLASS_MAPPINGS = { - "OllamaGenerate": OllamaGenerate, -} - -NODE_DISPLAY_NAME_MAPPINGS = { - "OllamaGenerate": "Ollama Generate", -} +from ollama import Client + +class OllamaGenerate: + def __init__(self): + pass + + @classmethod + def INPUT_TYPES(cls): + return { + "required": { + "prompt": ("STRING", { + "multiline": True, + "default": "What is Art?" + }), + "url": ("STRING", { + "multiline": False, + "default": "http://127.0.0.1:11434" + }), + "model": ((), {}), + }, + } + + RETURN_TYPES = ("STRING",) + RETURN_NAMES = ("response",) + FUNCTION = "ollama_generate" + CATEGORY = "Ollama" + + def ollama_generate(self, prompt, url, model): + # Keep_alive is now hardcoded to 0 (not visible to user) + keep_alive = 0 + + client = Client(host=url) + + # Generate the response from the model + response = client.generate( + model=model, + prompt=prompt, + keep_alive=f"{keep_alive}m" # keep_alive is always 0 + ) + + return (response['response'],) + +# Register the node with your node mapping system +NODE_CLASS_MAPPINGS = { + "OllamaGenerate": OllamaGenerate, +} + +NODE_DISPLAY_NAME_MAPPINGS = { + "OllamaGenerate": "Isulion Ollama Generate 🤖", +} diff --git a/isulion_animal_behavior_generator.py b/isulion_animal_behavior_generator.py new file mode 100644 index 0000000..d2bc5be --- /dev/null +++ b/isulion_animal_behavior_generator.py @@ -0,0 +1,43 @@ +import random +from nodes import NODE_CLASS_MAPPINGS + +class Isulion_AnimalBehaviorGenerator: + behaviors = [ + 'Hunting', 'Sleeping', 'Playing', 'Flying', 'Swimming', 'Running', + 'Walking', 'Eating', 'Drinking', 'Grooming', 'Nesting', 'Perching', + 'Climbing', 'Jumping', 'Diving', 'Stalking', 'Resting', 'Foraging', + 'Grazing', 'Prowling', 'Pouncing', 'Soaring', 'Gliding', 'Hovering', + 'Fishing', 'Basking', 'Burrowing', 'Hibernating', 'Migrating', + 'Mating', 'Nurturing', 'Teaching', 'Fighting', 'Defending', + 'Exploring', 'Hiding', 'Camouflaging', 'Gathering', 'Building', + 'Communicating' + ] + + @classmethod + def INPUT_TYPES(cls): + return { + "required": { + "randomize": (["enable", "disable"],), + "seed": ("INT", {"default": 0, "min": 0, "max": 999999999}), + "behavior": (cls.behaviors,) + } + } + + RETURN_TYPES = ("STRING", "INT",) + RETURN_NAMES = ("behavior", "seed",) + FUNCTION = "generate_behavior" + CATEGORY = "Art/Styles" + + def generate_behavior(self, randomize, seed, behavior): + if randomize == "enable": + if seed is not None and seed > 0: + random.seed(seed) + else: + seed = random.randint(0, 999999999) + random.seed(seed) + + behavior = random.choice(self.behaviors) + + return (f"{behavior}", seed) + +# Remove NODE_CLASS_MAPPINGS and NODE_DISPLAY_NAME_MAPPINGS from here \ No newline at end of file diff --git a/isulion_animal_generator.py b/isulion_animal_generator.py index db3aa20..0e09336 100644 --- a/isulion_animal_generator.py +++ b/isulion_animal_generator.py @@ -1,8 +1,7 @@ -<<<<<<< HEAD import random from nodes import NODE_CLASS_MAPPINGS -class IsulionAnimalRandom: +class Isulion_AnimalRandom: animals = [ 'Dog','Cat','Horse','Cow','Chicken','Pig','Sheep','Goat','Lion','Tiger','Elephant','Bear','Wolf','Fox','Deer','Rabbit','Kangaroo','Giraffe','Zebra','Monkey','Chimpanzee','Gorilla','Orangutan','Panda','Koala','Hippopotamus','Rhinoceros','Crocodile','Alligator','Eagle','Hawk','Falcon','Owl','Penguin','Dolphin','Whale','Shark','Octopus','Squid','Jellyfish','Crab','Lobster','Clownfish','Sea Turtle','Frog','Toad','Snake','Lizard','Gecko','Tortoise','Camel','Donkey','Bat','Rat','Mouse','Squirrel','Chipmunk','Porcupine','Hedgehog','Skunk','Raccoon','Otter','Seal','Walrus','Polar Bear','Grizzly Bear','Cheetah','Leopard','Jaguar','Antelope','Buffalo','Bison','Moose','Reindeer','Mole','Platypus','Echidna','Parrot','Peacock','Swan','Duck','Goose','Turkey','Flamingo','Pelican','Seagull','Sparrow','Pigeon','Crow','Magpie','Woodpecker','Hummingbird','Butterfly','Bee','Ant','Spider','Scorpion','Worm','Snail','Slug' ] @@ -17,7 +16,8 @@ class IsulionAnimalRandom: } } - RETURN_TYPES = ("Animal", "Seed",) # Two outputs: prompt string and seed + RETURN_TYPES = ("STRING", "INT",) # Two outputs: animal string and seed + RETURN_NAMES = ("animal", "seed",) # Names for the outputs FUNCTION = "random_animal" CATEGORY = "Art/Styles" @@ -33,51 +33,14 @@ class IsulionAnimalRandom: # Randomly select from predefined lists animal = random.choice(self.animals) - return (f"{animal}\n", animal, seed) + return (f"{animal}", seed) # Return both the animal name and the seed # Register the node with ComfyUI NODE_CLASS_MAPPINGS.update({ - "IsulionAnimalRandom": IsulionAnimalRandom + "IsulionAnimalRandom": Isulion_AnimalRandom }) -======= -import random -from nodes import NODE_CLASS_MAPPINGS -class IsulionAnimalRandom: - animals = [ - 'Dog','Cat','Horse','Cow','Chicken','Pig','Sheep','Goat','Lion','Tiger','Elephant','Bear','Wolf','Fox','Deer','Rabbit','Kangaroo','Giraffe','Zebra','Monkey','Chimpanzee','Gorilla','Orangutan','Panda','Koala','Hippopotamus','Rhinoceros','Crocodile','Alligator','Eagle','Hawk','Falcon','Owl','Penguin','Dolphin','Whale','Shark','Octopus','Squid','Jellyfish','Crab','Lobster','Clownfish','Sea Turtle','Frog','Toad','Snake','Lizard','Gecko','Tortoise','Camel','Donkey','Bat','Rat','Mouse','Squirrel','Chipmunk','Porcupine','Hedgehog','Skunk','Raccoon','Otter','Seal','Walrus','Polar Bear','Grizzly Bear','Cheetah','Leopard','Jaguar','Antelope','Buffalo','Bison','Moose','Reindeer','Mole','Platypus','Echidna','Parrot','Peacock','Swan','Duck','Goose','Turkey','Flamingo','Pelican','Seagull','Sparrow','Pigeon','Crow','Magpie','Woodpecker','Hummingbird','Butterfly','Bee','Ant','Spider','Scorpion','Worm','Snail','Slug' - ] - - @classmethod - def INPUT_TYPES(cls): - return { - "required": { - "randomize": (["enable", "disable"],), - "seed": ("INT", {"default": 0, "min": 0, "max": 999999999}), - "animal": (cls.animals,) - } - } - - RETURN_TYPES = ("Animal", "Seed",) # Two outputs: prompt string and seed - FUNCTION = "random_animal" - CATEGORY = "Art/Styles" - - def random_animal(self, randomize, seed, animal): - if randomize == "enable": - # Set seed for reproducibility if provided - if seed is not None and seed > 0: - random.seed(seed) - else: - seed = random.randint(0, 999999999) - random.seed(seed) - - # Randomly select from predefined lists - animal = random.choice(self.animals) - - return (f"{animal}\n", animal, seed) - -# Register the node with ComfyUI -NODE_CLASS_MAPPINGS.update({ - "IsulionAnimalRandom": IsulionAnimalRandom -}) ->>>>>>> 5eeae9531c3a965abf17b4d90ddd14ef8e64ed66 +# At the end of the file, after NODE_CLASS_MAPPINGS +NODE_DISPLAY_NAME_MAPPINGS = { + "IsulionAnimalRandom": "Isulion Animal Selector 🦁" +} diff --git a/isulion_art_style_generator.py b/isulion_art_style_generator.py new file mode 100644 index 0000000..7cba8ac --- /dev/null +++ b/isulion_art_style_generator.py @@ -0,0 +1,43 @@ +import random +from nodes import NODE_CLASS_MAPPINGS + +class Isulion_ArtStyleGenerator: + styles = [ + 'Realistic', 'Watercolor', 'Oil Painting', 'Sketch', 'Digital Art', + 'Impressionism', 'Expressionism', 'Surrealism', 'Pop Art', 'Abstract', + 'Minimalist', 'Comic Book', 'Manga', 'Anime', 'Pixel Art', + 'Vector Art', 'Low Poly', '3D Rendering', 'Concept Art', 'Fantasy Art', + 'Gothic', 'Baroque', 'Renaissance', 'Art Nouveau', 'Art Deco', + 'Cubism', 'Pointillism', 'Photorealism', 'Hyperrealism', 'Naive Art', + 'Folk Art', 'Street Art', 'Graffiti', 'Retro', 'Vintage', + 'Steampunk', 'Cyberpunk', 'Vaporwave', 'Ukiyo-e', 'Chinese Painting' + ] + + @classmethod + def INPUT_TYPES(cls): + return { + "required": { + "randomize": (["enable", "disable"],), + "seed": ("INT", {"default": 0, "min": 0, "max": 999999999}), + "style": (cls.styles,) + } + } + + RETURN_TYPES = ("STRING", "INT",) + RETURN_NAMES = ("style", "seed",) + FUNCTION = "generate_style" + CATEGORY = "Art/Styles" + + def generate_style(self, randomize, seed, style): + if randomize == "enable": + if seed is not None and seed > 0: + random.seed(seed) + else: + seed = random.randint(0, 999999999) + random.seed(seed) + + style = random.choice(self.styles) + + return (f"{style}", seed) + +# Remove NODE_CLASS_MAPPINGS and NODE_DISPLAY_NAME_MAPPINGS from here \ No newline at end of file diff --git a/isulion_cute_animal_generator.py b/isulion_cute_animal_generator.py index ed12967..d2d3236 100644 --- a/isulion_cute_animal_generator.py +++ b/isulion_cute_animal_generator.py @@ -1,4 +1,3 @@ -<<<<<<< HEAD import random from nodes import NODE_CLASS_MAPPINGS @@ -17,7 +16,8 @@ class IsulionCuteAnimalRandom: } } - RETURN_TYPES = ("Animal", "Seed",) # Two outputs: prompt string and seed + RETURN_TYPES = ("STRING", "INT",) # Two outputs: animal string and seed + RETURN_NAMES = ("animal", "seed",) # Names for the outputs FUNCTION = "random_animal" CATEGORY = "Art/Styles" @@ -33,51 +33,4 @@ class IsulionCuteAnimalRandom: # Randomly select from predefined lists animal = random.choice(self.animals) - return (f"{animal}\n", animal, seed) - -# Register the node with ComfyUI -NODE_CLASS_MAPPINGS.update({ - "IsulionCuteAnimalRandom": IsulionCuteAnimalRandom -}) -======= -import random -from nodes import NODE_CLASS_MAPPINGS - -class IsulionCuteAnimalRandom: - animals = [ - 'Red Panda','Koala','Fennec Fox','Pygmy Marmoset','Quokka','Sea Otter','Harp Seal Pup','Panda Cub','Penguin Chick','Hedgehog','Axolotl','Sloth','Rabbit','Kitten','Puppy','Meerkat','Sugar Glider','Chinchilla','Slow Loris','Hamster','Red Fox Kit','Lamb','Piglet','Duckling','Pygmy Hippo','Baby Giraffe','Baby Alpaca','Otter Pup','Corgi Puppy','Golden Retriever Puppy','Seal Pup','Snow Leopard Cub','Tiger Cub','Lion Cub','Baby Gorilla','Baby Orangutan','Pygmy Goat','Fawn (Baby Deer)','Ferret','Platypus','Kangaroo Joey','Wallaby','Dik-Dik','Serval Kitten','Caracal Kitten','Clouded Leopard Cub','Red Squirrel','Chipmunk','Prairie Dog','Arctic Fox','Polar Bear Cub','Bottlenose Dolphin Calf','Beluga Whale Calf','Manatee Calf','Baby Skunk','Raccoon Kit','Baby Opossum','Baby Echidna (Puggle)','Baby Tapir','GiantPanda Cub','Baby Hippo','Baby Rhino','Baby Zebra','Baby Elephant Seal','Baby Wombat','Baby Emu','Baby Kiwi Bird','Baby Flamingo','Cygnet (Baby Swan)','Baby Tortoise','Baby Alligator','Baby Crocodile','Baby Chameleon','Baby Iguana','Baby Frog','Baby Toad','Baby Gecko','Ring-tailed Lemur','Sifaka Lemur','Mouse Lemur','Bush Baby','PygmyPossum','Baby Mole','Baby Bat','Leveret (Baby Hare)','Baby Mole Rat','Baby Porcupine','Baby Badger','Pygmy Rabbit','Baby Seal','Baby Puffin','Owlet (Baby Owl)','Hoglet(Baby Hedgehog)','Baby Armadillo','Baby Pangolin','Baby Okapi','Baby Cheetah','Baby Ocelot','Baby Lynx','Baby Tasmanian Devil' - ] - - @classmethod - def INPUT_TYPES(cls): - return { - "required": { - "randomize": (["enable", "disable"],), - "seed": ("INT", {"default": 0, "min": 0, "max": 999999999}), - "animal": (cls.animals,) - } - } - - RETURN_TYPES = ("Animal", "Seed",) # Two outputs: prompt string and seed - FUNCTION = "random_animal" - CATEGORY = "Art/Styles" - - def random_animal(self, randomize, seed, animal): - if randomize == "enable": - # Set seed for reproducibility if provided - if seed is not None and seed > 0: - random.seed(seed) - else: - seed = random.randint(0, 999999999) - random.seed(seed) - - # Randomly select from predefined lists - animal = random.choice(self.animals) - - return (f"{animal}\n", animal, seed) - -# Register the node with ComfyUI -NODE_CLASS_MAPPINGS.update({ - "IsulionCuteAnimalRandom": IsulionCuteAnimalRandom -}) ->>>>>>> 5eeae9531c3a965abf17b4d90ddd14ef8e64ed66 + return (f"{animal}", seed) # Return both the animal name and the seed diff --git a/isulion_emotion_generator.py b/isulion_emotion_generator.py new file mode 100644 index 0000000..57697d0 --- /dev/null +++ b/isulion_emotion_generator.py @@ -0,0 +1,55 @@ +import random +from nodes import NODE_CLASS_MAPPINGS + +class Isulion_EmotionGenerator: + emotions = [ + 'Happy', 'Sad', 'Angry', 'Excited', 'Nervous', 'Calm', 'Peaceful', 'Anxious', + 'Joyful', 'Melancholic', 'Furious', 'Cheerful', 'Depressed', 'Enthusiastic', + 'Frustrated', 'Content', 'Worried', 'Serene', 'Irritated', 'Ecstatic', + 'Gloomy', 'Relaxed', 'Stressed', 'Satisfied', 'Disappointed', 'Proud', + 'Scared', 'Confident', 'Shy', 'Jealous', 'Grateful', 'Lonely', 'Loved', + 'Confused', 'Determined', 'Hopeful', 'Tired', 'Energetic', 'Bored', + 'Surprised', 'Curious', 'Embarrassed', 'Guilty', 'Relief', 'Nostalgic' + ] + + @classmethod + def INPUT_TYPES(cls): + return { + "required": { + "randomize": (["enable", "disable"],), + "seed": ("INT", {"default": 0, "min": 0, "max": 999999999}), + "emotion": (cls.emotions,) + } + } + + RETURN_TYPES = ("STRING", "STRING", "INT",) # Returns prompt string, emotion, and seed + RETURN_NAMES = ("prompt", "emotion", "seed",) + FUNCTION = "generate_emotion" + CATEGORY = "Art/Styles" + + def generate_emotion(self, randomize, seed, emotion): + if randomize == "enable": + # Set seed for reproducibility if provided + if seed is not None and seed > 0: + random.seed(seed) + else: + seed = random.randint(0, 999999999) + random.seed(seed) + + # Randomly select emotion + emotion = random.choice(self.emotions) + + # Create prompt with the emotion + prompt = f"feeling {emotion.lower()}, emotional" + + return (prompt, emotion, seed) + +# Register the node with ComfyUI +NODE_CLASS_MAPPINGS.update({ + "IsulionEmotionGenerator": Isulion_EmotionGenerator +}) + +# At the end of the file, after NODE_CLASS_MAPPINGS +NODE_DISPLAY_NAME_MAPPINGS = { + "IsulionEmotionGenerator": "Isulion Emotion Generator 😊" +} \ No newline at end of file diff --git a/isulion_habitat_generator.py b/isulion_habitat_generator.py new file mode 100644 index 0000000..f34f9b6 --- /dev/null +++ b/isulion_habitat_generator.py @@ -0,0 +1,42 @@ +import random +from nodes import NODE_CLASS_MAPPINGS + +class Isulion_HabitatGenerator: + habitats = [ + 'Jungle', 'Rainforest', 'Savanna', 'Desert', 'Arctic Tundra', 'Ocean', 'Coral Reef', + 'Mountain Range', 'Alpine Forest', 'Grassland', 'Wetland', 'Mangrove Swamp', + 'Deciduous Forest', 'Coniferous Forest', 'Rocky Shore', 'Sandy Beach', 'Cave System', + 'River Valley', 'Lake Shore', 'Bamboo Forest', 'Salt Marsh', 'Kelp Forest', + 'Volcanic Region', 'Coastal Cliff', 'Prairie', 'Steppe', 'Taiga', 'Deep Ocean', + 'Shallow Reef', 'Underground Cave', 'Hot Spring', 'Oasis', 'Canyon', 'Delta', + 'Estuary', 'Fjord', 'Glacier', 'Ice Sheet', 'Island', 'Peninsula' + ] + + @classmethod + def INPUT_TYPES(cls): + return { + "required": { + "randomize": (["enable", "disable"],), + "seed": ("INT", {"default": 0, "min": 0, "max": 999999999}), + "habitat": (cls.habitats,) + } + } + + RETURN_TYPES = ("STRING", "INT",) + RETURN_NAMES = ("habitat", "seed",) + FUNCTION = "generate_habitat" + CATEGORY = "Art/Styles" + + def generate_habitat(self, randomize, seed, habitat): + if randomize == "enable": + if seed is not None and seed > 0: + random.seed(seed) + else: + seed = random.randint(0, 999999999) + random.seed(seed) + + habitat = random.choice(self.habitats) + + return (f"{habitat}", seed) + +# Remove NODE_CLASS_MAPPINGS and NODE_DISPLAY_NAME_MAPPINGS from here \ No newline at end of file diff --git a/isulion_prompt_generator.py b/isulion_prompt_generator.py index d9dcae5..d83f435 100644 --- a/isulion_prompt_generator.py +++ b/isulion_prompt_generator.py @@ -1,61 +1,65 @@ -import random -from nodes import NODE_CLASS_MAPPINGS - -class IsulionPromptGenerator: - styles = [ - '3D Rendering','Abstract Art','Aerial Photography','Airbrush Art','Anime','Architectural Photography','Art Brut','Art Deco','Art Nouveau','Assemblage','Avant-garde','Baroque','Black and White Photography','Calligraphy','Caricature','Charcoal Drawing','Chiaroscuro','Cinematic Photography','Classicism','Collage','Comic Book Style','Concept Art','Constructivism','Cubism','Cyberpunk','Dadaism','Digital Art','Dotwork','Drawing','Eco-Art','Egyptian Art','Engraving','Etching','Expressionism','Fantasy Art','Fashion Photography','Fauvism','Film Still','Fine Art Photography','Flat Design','Food Photography','Found Art','Fresco','Futurism','Geometric Art','Glitch Art','Gothic Art','Graffiti','Graffiti Art','HDR Photography','Hyperrealism','Iconography','Illustration','Impressionism','Ink Drawing','Infrared Photography','Installation Art','Isometric Art','Japanese Ink Art','Kinetic Art','Landscape Photography','Lithography','Long Exposure','Low Poly','Macro Photography','Manga Style','Matte Painting','Minimalism','Minimalist','Mixed Media','Muralism','Neo-Classicism','Night Photography','Oil Painting','Op Art','Panoramic Photography','Pastel Art','Pencil Sketch','Performance Art','Photojournalism','Photorealism','Pixel Art','Pointillism','Pop Art','Portrait Photography','Post-Impressionism','Postmodern Art','Printmaking','Realism','Retro','Rococo','Romanticism','Sculpture','Sci-Fi Art','Sepia','Steampunk','Still Life','Street Art','Street Photography','Surrealism','Synthwave','Tilt-Shift Photography','Typography Art','Ukiyo-e','Underwater Photography','Urban Art','Vector Art','Vibrant Colors','Vintage','Watercolor','Wildlife Photography','Woodcut' - ] - - color_palettes = [ - 'Analogous Colors','Autumn Leaves','Black and White','Bright Neons','Bright Warm Tones','Complementary Colors','Cool Colors','Cyberpunk Palette','Desert Sand Palette','Duotone','Earth Tones','Earthy Greens','Electric Blue','Fiery Reds','Fluorescent Colors','Forest Greens','Golden Tones','Grayscale','High Contrast','Jewel Tones','Low Contrast','Metallic Hues','Minimalist Palette','Monochrome','Monotone Palette','Muted Colors','Neon Colors','Neon Noir','Oceanic Palette','Pastel Colors','Pastel Rainbow','Pop Art Palette','Primary Colors','Rainbow','Retro Colors','Rose Gold','Royal Blues','Secondary Colors','Sepia','Shadow Palette','Smoky Shades','Soft Pinks','Spring Blossoms','Steampunk Palette','Summer Vibes','Sunset Palette','Triadic Colors','Tropical Palette','Twilight Palette','Vibrant Colors','Vintage Colors','Warm Colors','Winter Frost' - ] - subjects = [ - 'A beautiful landscape with rolling hills','A calm lake reflecting the mountains','A blooming cherry blossom tree','A deserted beach with golden sand','A close-up of a butterfly on a flower','A dramatic sunset over the ocean','A starry night sky with a full moon','A waterfall in a tropical rainforest','A snow-covered forest in winter','A desert landscape with sand dunes','An old lighthouse by the sea','A field of sunflowers under a blue sky','A tranquil Japanese garden','A vintage car parked on a cobblestone street','A herd of wild horses running free','A misty mountain range at dawn','A colorful hot air balloon in the sky','A rustic barn in the countryside','A rainbow over a meadow','A coral reef teeming with fish','An abandoned castle on a hill','A glacier floating in the Arctic sea','A forest path covered in autumn leaves','A meteor shower in the night sky','A crystal-clear lake surrounded by trees','A canyon with layered rock formations','A farm with fields of wheat','A tropical island with palm trees','A futuristic city with skyscrapers','A galaxy with swirling stars','A steampunk airship sailing the skies','A dragon flying over mountains','An enchanted forest with glowing plants','A robot exploring a distant planet','An ancient ruin overgrown with vines','A lighthouse during a stormy night','A snow-capped volcano','A whimsical treehouse in a forest','A crystal cave illuminated by light','A serene meadow filled with wildflowers','A giant mushroom in a fantasy world','A futuristic spacecraft orbiting Earth','A bridge shrouded in fog','A close-up of a snowflake','An iceberg drifting in the sea','A tropical rainforest canopy','A serene Zen garden','A colorful coral reef underwater','A volcano erupting with lava','An aurora borealis over snowy mountains','A sunflower field at sunset','A majestic eagle soaring in the sky','A mysterious cave entrance','A close-up of a dewdrop on a leaf','An old windmill on a hill','A sailboat on a calm lake','A stone bridge over a river','A cloudscape with dramatic lighting','A field of lavender in bloom','A rustic cabin in the woods','A vibrant carnival mask','A futuristic robot','An underwater shipwreck','A galaxy with colorful nebulas','A tranquil pond with koi fish','A hot air balloon festival','An ancient tree with sprawling roots','A city skyline at night','A peacock displaying its feathers','A herd of elephants in the savannah','A rustic lighthouse at sunset','A mountain reflected in a lake','A whimsical fairy tale castle','A desert cactus in bloom','A glowing jellyfish underwater','A farmyard with animals','A field of poppies','An iceberg under the northern lights','A thunderstorm over the ocean','A Japanese pagoda surrounded by trees','A starfish on the sandy beach','A futuristic city floating in the sky','A rainbow over a waterfall','A whale breaching the water','A snowy owl in flight','A medieval castle with towers','A dragonfly resting on a leaf','A moss-covered forest floor','A coral reef with sea turtles','An old steam locomotive','A flock of birds migrating','A solar eclipse','A meadow with grazing deer','A space station orbiting Earth','A close-up of a ladybug','A wind farm with turbines','A colorful cityscape at dusk','A field of pumpkins in autumn','A sea turtle swimming','A comet streaking across the sky','A river flowing through a canyon','A giant sequoia tree','A blooming cactus flower','A polar bear on ice','A vibrant coral garden','A mystical foggy forest','A vineyard with ripe grapes','A futuristic monorail train','A sunset over the desert','A pack of wolves in the snow','A colorful parrot in the jungle','A floating lantern festival','A koi pond with lily pads','A spiral galaxy','A stormy sea with high waves','An old ship sailing at sea','A butterfly garden','A field of golden wheat','A mountain peak above the clouds','A robot in a futuristic lab','A close-up of a honeybee on a flower','A rustic stone cottage','A tropical fish in a coral reef','A desert landscape with rock arches','A snowy mountain lodge','A golden retriever playing','A forest stream with rocks','A thunderstorm over a city','A field of daisies','A seagull flying over the ocean','A galaxy cluster in space','A red fox in the forest','An ancient temple in the jungle','A frozen waterfall in winter','A futuristic car speeding','A close-up of a peacock feather','A pumpkin patch at harvest','A snowy village during Christmas','A bioluminescent beach at night','A rustic bridge in the forest','A comet passing near Earth','A sunflower facing the sun','An underwater cave with stalactites','A rainbow-colored hot air balloon','A desert landscape with mesas','A castle on a cliff by the sea','A close-up of a hummingbird','A field of bluebells','An old clock tower','A dolphin jumping out of the water','A futuristic city underwater','A glowing mushroom in a dark forest','A windmill under the stars','A crystal-clear mountain stream','A galaxy with spiral arms','A hot spring in a snowy landscape','A snowy owl perched on a branch','A canyon with a river at the bottom','A steam locomotive crossing a bridge','A futuristic spacecraft landing','A rose garden in full bloom','A lightning bolt in the night sky','A penguin colony on ice','A waterfall cascading into a pool','A desert with cacti at sunset','A meadow with grazing sheep','An old library filled with books','A close-up of a seashell','A robot in a meadow','A tranquil pond with lotus flowers','A mountain range during sunrise','A starry sky over the desert','A lighthouse illuminating the night','A forest blanketed in fog','A colorful sunset over the ocean','A butterfly emerging from a cocoon','An ancient oak tree','A space nebula with vibrant colors','A desert road stretching into the horizon','A hot air balloon over vineyards','A galaxy with twin stars','A whale shark swimming','A field of lavender at dusk','A glacier melting into the sea','A comet tail in deep space','A rainbow over rolling hills','A futuristic city with flying cars','A dragon curled around a tower','A coral reef with clownfish','An old windmill by a lake','A mountain reflected in still water','A fantasy castle in the clouds','A stormy sky with dark clouds','A close-up of a leaf with raindrops','A desert landscape with mirages','An aurora over a frozen lake','A steampunk clock with gears','A cherry blossom festival','A peacock spreading its feathers','A rustic farmhouse with fields','A sea turtle swimming underwater','A meadow with wildflowers','A hummingbird hovering near a flower','A futuristic robot exploring','A field of red poppies','A dragonfly over a pond','A crystal chandelier sparkling','A snowy landscape with pine trees','A rainbow over a city skyline','A sunset over the plains','A close-up of an eye with reflection','A snowy mountain reflected in a lake','A galaxy with a black hole','A stormy sea with lightning','A hot air balloon over a desert','A waterfall surrounded by greenery','A field of sunflowers facing the sun','An ancient bridge over a river','A robot hand holding a flower','A forest with tall redwood trees','A close-up of a cat s eye','A dragon flying over a city','A desert with towering sand dunes','A starfish on the ocean floor','A comet passing by a planet','An underwater scene with dolphins','A vintage bicycle against a wall','A snowy path through the woods','A galaxy with colorful gases','A mountain range during sunset','A bridge lit up at night','A close-up of a snail on a leaf','A field of daisies under a blue sky','A coral reef with exotic fish','A hot air balloon over mountains','A futuristic spaceship in space','A rainbow over a waterfall','A forest with sunbeams through trees','A lion resting in the grass','A castle surrounded by a moat','A crystal ball on a stand','A forest floor with mushrooms','A sunset over the ocean waves','A snowy owl in flight','A robot in a cityscape','A meadow with butterflies','A mountain reflected in a lake','A colorful nebula in space','A thunderstorm over fields','A coral reef with sea horses','A desert with a single cactus','An old shipwreck on the beach','A galaxy with shooting stars','A windmill under a cloudy sky','A tiger walking through the jungle','A futuristic city with neon lights','A hot air balloon over fields','A waterfall in a tropical setting','A field of lavender in bloom','A close-up of a dragonfly wing','A robot with glowing eyes','A snowy landscape at dawn','A galaxy with swirling colors','A lighthouse during sunset','A peacock feather in detail','A meadow with grazing horses','A coral reef with manta rays','A mountain covered in fog','A desert with a mirage','A close-up of a crystal','A rainbow over green hills','A futuristic skyline','A galaxy with planets aligning','A forest with autumn colors','A robot standing in a field','A snowy mountain under stars','A waterfall in a forest','A meadow with wildflowers','A desert landscape at dusk','A coral reef with colorful fish','A close-up of a sunflower','A lighthouse on a cliff','A futuristic vehicle in motion','A field of wheat waving in the wind','A galaxy with bright stars','A robot hand reaching out','A mountain range at sunrise','A rainbow over the ocean','A forest with fog','A butterfly on a leaf','A hot air balloon at sunrise','A coral reef with jellyfish','A desert with rock formations','A field of sunflowers','A robot in a futuristic city','A snowy landscape with aurora','A waterfall in a canyon','A close-up of a leaf vein','A galaxy with cosmic dust','A lighthouse in a storm','A meadow with grazing cows','A mountain reflected in water','A rainbow over mountains','A robot exploring ruins','A forest with sun rays','A hot air balloon over a lake','A coral reef with starfish','A desert landscape with cacti','A field of lavender at sunset','A futuristic city with flying vehicles','A galaxy with multiple planets','A close-up of a water droplet','A snowy mountain peak','A waterfall in the mountains','A meadow with daisies','A robot looking at the stars','A rainbow over a forest','A butterfly garden in bloom','A desert with a lone tree','A coral reef with coral formations','A mountain landscape in autumn','A hot air balloon over fields','A forest with colorful leaves','A robot in a lab','A galaxy with spiral arms','A lighthouse by the sea','A waterfall with a rainbow','A meadow under a blue sky','A coral reef with bright colors','A mountain at dusk','A desert sunset','A robot with a glowing core','A butterfly resting on a flower','A galaxy with nebulae','A snowy landscape with trees','A hot air balloon festival','A forest with a clear stream','A meadow filled with poppies','A robot in a desert','A rainbow over a city','A mountain range with snow','A coral reef with fish','A waterfall surrounded by rocks','A field of sunflowers','A galaxy with distant stars','A desert with dunes','A close-up of an insect wing','A robot in an industrial area','A snowy mountain under a full moon','A meadow with a small pond','A butterfly on a blade of grass','A hot air balloon over mountains','A forest with dense trees','A rainbow over a meadow','A coral reef with sea life','A mountain with a glacier','A robot standing on a hill','A galaxy with colorful gases','A waterfall in a tropical forest','A desert landscape at night','A meadow with wildflowers','A butterfly landing on a plant','A lighthouse guiding ships','A close-up of raindrops on petals','A robot reaching for the sky','A hot air balloon over vineyards','A snowy landscape with cabins','A galaxy with bright stars','A forest with mist','A coral reef with diverse life','A mountain during golden hour','A desert with a caravan of camels','A waterfall in a hidden valley','A rainbow over rolling hills','A robot exploring an alien world','A butterfly garden in spring','A meadow with tall grasses','A galaxy with twin suns','A hot air balloon above clouds','A coral reef with sharks','A mountain with a clear sky','A desert landscape with rocks','A waterfall into a clear pool','A rainbow over a lighthouse' - ] - - lightings = [ - 'Accent Lighting','Ambient Lighting','Artificial Lighting','Backlighting','Bicolor Lighting','Bottom Lighting','Bounce Lighting','Candlelight','Chiaroscuro','Chromatic Lighting','Colored Lighting','Cross Lighting','Diffuse Lighting','Directional Lighting','Direct Lighting','Dramatic Lighting','Edge Lighting','Fill Lighting','Firelight','Flat Lighting','Fluorescent Lighting','Frontal Lighting','Frosted Lighting','Gaffer Lighting','Glamour Lighting','Golden Hour','Halo Lighting','Hard Light','High Key','Incandescent Lighting','Industrial Lighting','Interior Lighting','Kicker Lighting','LED Lighting','Low Key','Magic Hour','Moonlight','Morning Light','Motivated Lighting','Natural Light','Neon Lighting','Night Lighting','Outdoor Lighting','Overhead Lighting','Overcast','Practical Lighting','Profile Lighting','Prop Lighting','Puddle Lighting','Radiant Lighting','Reflective Lighting','Rembrandt Lighting','Rim Lighting','Ring Light','Sidelight','Side Lighting','Silhouette Lighting','Soft Light','Specular Lighting','Spotlight','Starlight','Strip Lighting','Studio Lighting','Strobe Lighting','Subsurface Scattering','Sunbeam Lighting','Sunlight','Sunrise','Sunset','Surface Lighting','Top Lighting','Track Lighting','Tungsten Lighting','Twilight Lighting','Underexposed Lighting','Underwater Lighting','UV Lighting','Warm Lighting','Water Reflected Lighting','Window Lighting','Winter Lighting','Xenon Lighting','Candle Glow','Crossover Lighting','Diffraction Lighting','Electric Glow','Filament Lighting','Flickering Light','Fluorescence Light','Ghost Lighting','Incandescent Glow','LED Glow','Lightning Bolt','Moon Glow','Neon Glow','Night Glow','Overhead Glow','Pinhole Light','Rim Glow','Side Glow','Twilight Glow','Sunset Glow' - ] - - @classmethod - def INPUT_TYPES(cls): - return { - "required": { - "randomize": (["enable", "disable"],), - "seed": ("INT", {"default": 0, "min": 0, "max": 999999999}), - "style": (cls.styles,), - "subject": (cls.subjects,), - "color_palette": (cls.color_palettes,), - "lighting": (cls.lightings,) - } - } - - RETURN_TYPES = ("All", "Subject","Style", "Color_Palette", "Lighting", "Seed",) # Two outputs: prompt string and seed - FUNCTION = "choose_style_palette_and_lighting" - CATEGORY = "Art/Styles" - - def choose_style_palette_and_lighting(self, randomize, seed, style, color_palette, lighting, subject): - if randomize == "enable": - # Set seed for reproducibility if provided - if seed is not None and seed > 0: - random.seed(seed) - else: - seed = random.randint(0, 999999999) - random.seed(seed) - - # Randomly select from predefined lists - style = random.choice(self.styles) - color_palette = random.choice(self.color_palettes) - lighting = random.choice(self.lightings) - subject = random.choice(self.subjects) # Use predefined subjects for randomization - - # If randomization is disabled, use the user's input for 'subject' - # The 'style', 'color_palette', and 'lighting' remain as selected from the lists - - # Return the prompt and the outputs - return (f"Subject: {subject}\nStyle: {style}\nColor Palette: {color_palette}\nLighting: {lighting}", subject, style, color_palette,lighting, seed) - -# Register the node with ComfyUI -NODE_CLASS_MAPPINGS.update({ - "IsulionPromptGenerator": IsulionPromptGenerator -}) +import random +from nodes import NODE_CLASS_MAPPINGS + +class IsulionPromptGenerator: + styles = [ + '3D Rendering','Abstract Art','Aerial Photography','Airbrush Art','Anime','Architectural Photography','Art Brut','Art Deco','Art Nouveau','Assemblage','Avant-garde','Baroque','Black and White Photography','Calligraphy','Caricature','Charcoal Drawing','Chiaroscuro','Cinematic Photography','Classicism','Collage','Comic Book Style','Concept Art','Constructivism','Cubism','Cyberpunk','Dadaism','Digital Art','Dotwork','Drawing','Eco-Art','Egyptian Art','Engraving','Etching','Expressionism','Fantasy Art','Fashion Photography','Fauvism','Film Still','Fine Art Photography','Flat Design','Food Photography','Found Art','Fresco','Futurism','Geometric Art','Glitch Art','Gothic Art','Graffiti','Graffiti Art','HDR Photography','Hyperrealism','Iconography','Illustration','Impressionism','Ink Drawing','Infrared Photography','Installation Art','Isometric Art','Japanese Ink Art','Kinetic Art','Landscape Photography','Lithography','Long Exposure','Low Poly','Macro Photography','Manga Style','Matte Painting','Minimalism','Minimalist','Mixed Media','Muralism','Neo-Classicism','Night Photography','Oil Painting','Op Art','Panoramic Photography','Pastel Art','Pencil Sketch','Performance Art','Photojournalism','Photorealism','Pixel Art','Pointillism','Pop Art','Portrait Photography','Post-Impressionism','Postmodern Art','Printmaking','Realism','Retro','Rococo','Romanticism','Sculpture','Sci-Fi Art','Sepia','Steampunk','Still Life','Street Art','Street Photography','Surrealism','Synthwave','Tilt-Shift Photography','Typography Art','Ukiyo-e','Underwater Photography','Urban Art','Vector Art','Vibrant Colors','Vintage','Watercolor','Wildlife Photography','Woodcut' + ] + + color_palettes = [ + 'Analogous Colors','Autumn Leaves','Black and White','Bright Neons','Bright Warm Tones','Complementary Colors','Cool Colors','Cyberpunk Palette','Desert Sand Palette','Duotone','Earth Tones','Earthy Greens','Electric Blue','Fiery Reds','Fluorescent Colors','Forest Greens','Golden Tones','Grayscale','High Contrast','Jewel Tones','Low Contrast','Metallic Hues','Minimalist Palette','Monochrome','Monotone Palette','Muted Colors','Neon Colors','Neon Noir','Oceanic Palette','Pastel Colors','Pastel Rainbow','Pop Art Palette','Primary Colors','Rainbow','Retro Colors','Rose Gold','Royal Blues','Secondary Colors','Sepia','Shadow Palette','Smoky Shades','Soft Pinks','Spring Blossoms','Steampunk Palette','Summer Vibes','Sunset Palette','Triadic Colors','Tropical Palette','Twilight Palette','Vibrant Colors','Vintage Colors','Warm Colors','Winter Frost' + ] + subjects = [ + 'A beautiful landscape with rolling hills','A calm lake reflecting the mountains','A blooming cherry blossom tree','A deserted beach with golden sand','A close-up of a butterfly on a flower','A dramatic sunset over the ocean','A starry night sky with a full moon','A waterfall in a tropical rainforest','A snow-covered forest in winter','A desert landscape with sand dunes','An old lighthouse by the sea','A field of sunflowers under a blue sky','A tranquil Japanese garden','A vintage car parked on a cobblestone street','A herd of wild horses running free','A misty mountain range at dawn','A colorful hot air balloon in the sky','A rustic barn in the countryside','A rainbow over a meadow','A coral reef teeming with fish','An abandoned castle on a hill','A glacier floating in the Arctic sea','A forest path covered in autumn leaves','A meteor shower in the night sky','A crystal-clear lake surrounded by trees','A canyon with layered rock formations','A farm with fields of wheat','A tropical island with palm trees','A futuristic city with skyscrapers','A galaxy with swirling stars','A steampunk airship sailing the skies','A dragon flying over mountains','An enchanted forest with glowing plants','A robot exploring a distant planet','An ancient ruin overgrown with vines','A lighthouse during a stormy night','A snow-capped volcano','A whimsical treehouse in a forest','A crystal cave illuminated by light','A serene meadow filled with wildflowers','A giant mushroom in a fantasy world','A futuristic spacecraft orbiting Earth','A bridge shrouded in fog','A close-up of a snowflake','An iceberg drifting in the sea','A tropical rainforest canopy','A serene Zen garden','A colorful coral reef underwater','A volcano erupting with lava','An aurora borealis over snowy mountains','A sunflower field at sunset','A majestic eagle soaring in the sky','A mysterious cave entrance','A close-up of a dewdrop on a leaf','An old windmill on a hill','A sailboat on a calm lake','A stone bridge over a river','A cloudscape with dramatic lighting','A field of lavender in bloom','A rustic cabin in the woods','A vibrant carnival mask','A futuristic robot','An underwater shipwreck','A galaxy with colorful nebulas','A tranquil pond with koi fish','A hot air balloon festival','An ancient tree with sprawling roots','A city skyline at night','A peacock displaying its feathers','A herd of elephants in the savannah','A rustic lighthouse at sunset','A mountain reflected in a lake','A whimsical fairy tale castle','A desert cactus in bloom','A glowing jellyfish underwater','A farmyard with animals','A field of poppies','An iceberg under the northern lights','A thunderstorm over the ocean','A Japanese pagoda surrounded by trees','A starfish on the sandy beach','A futuristic city floating in the sky','A rainbow over a waterfall','A whale breaching the water','A snowy owl in flight','A medieval castle with towers','A dragonfly resting on a leaf','A moss-covered forest floor','A coral reef with sea turtles','An old steam locomotive','A flock of birds migrating','A solar eclipse','A meadow with grazing deer','A space station orbiting Earth','A close-up of a ladybug','A wind farm with turbines','A colorful cityscape at dusk','A field of pumpkins in autumn','A sea turtle swimming','A comet streaking across the sky','A river flowing through a canyon','A giant sequoia tree','A blooming cactus flower','A polar bear on ice','A vibrant coral garden','A mystical foggy forest','A vineyard with ripe grapes','A futuristic monorail train','A sunset over the desert','A pack of wolves in the snow','A colorful parrot in the jungle','A floating lantern festival','A koi pond with lily pads','A spiral galaxy','A stormy sea with high waves','An old ship sailing at sea','A butterfly garden','A field of golden wheat','A mountain peak above the clouds','A robot in a futuristic lab','A close-up of a honeybee on a flower','A rustic stone cottage','A tropical fish in a coral reef','A desert landscape with rock arches','A snowy mountain lodge','A golden retriever playing','A forest stream with rocks','A thunderstorm over a city','A field of daisies','A seagull flying over the ocean','A galaxy cluster in space','A red fox in the forest','An ancient temple in the jungle','A frozen waterfall in winter','A futuristic car speeding','A close-up of a peacock feather','A pumpkin patch at harvest','A snowy village during Christmas','A bioluminescent beach at night','A rustic bridge in the forest','A comet passing near Earth','A sunflower facing the sun','An underwater cave with stalactites','A rainbow-colored hot air balloon','A desert landscape with mesas','A castle on a cliff by the sea','A close-up of a hummingbird','A field of bluebells','An old clock tower','A dolphin jumping out of the water','A futuristic city underwater','A glowing mushroom in a dark forest','A windmill under the stars','A crystal-clear mountain stream','A galaxy with spiral arms','A hot spring in a snowy landscape','A snowy owl perched on a branch','A canyon with a river at the bottom','A steam locomotive crossing a bridge','A futuristic spacecraft landing','A rose garden in full bloom','A lightning bolt in the night sky','A penguin colony on ice','A waterfall cascading into a pool','A desert with cacti at sunset','A meadow with grazing sheep','An old library filled with books','A close-up of a seashell','A robot in a meadow','A tranquil pond with lotus flowers','A mountain range during sunrise','A starry sky over the desert','A lighthouse illuminating the night','A forest blanketed in fog','A colorful sunset over the ocean','A butterfly emerging from a cocoon','An ancient oak tree','A space nebula with vibrant colors','A desert road stretching into the horizon','A hot air balloon over vineyards','A galaxy with twin stars','A whale shark swimming','A field of lavender at dusk','A glacier melting into the sea','A comet tail in deep space','A rainbow over rolling hills','A futuristic city with flying cars','A dragon curled around a tower','A coral reef with clownfish','An old windmill by a lake','A mountain reflected in still water','A fantasy castle in the clouds','A stormy sky with dark clouds','A close-up of a leaf with raindrops','A desert landscape with mirages','An aurora over a frozen lake','A steampunk clock with gears','A cherry blossom festival','A peacock spreading its feathers','A rustic farmhouse with fields','A sea turtle swimming underwater','A meadow with wildflowers','A hummingbird hovering near a flower','A futuristic robot exploring','A field of red poppies','A dragonfly over a pond','A crystal chandelier sparkling','A snowy landscape with pine trees','A rainbow over a city skyline','A sunset over the plains','A close-up of an eye with reflection','A snowy mountain reflected in a lake','A galaxy with a black hole','A stormy sea with lightning','A hot air balloon over a desert','A waterfall surrounded by greenery','A field of sunflowers facing the sun','An ancient bridge over a river','A robot hand holding a flower','A forest with tall redwood trees','A close-up of a cat s eye','A dragon flying over a city','A desert with towering sand dunes','A starfish on the ocean floor','A comet passing by a planet','An underwater scene with dolphins','A vintage bicycle against a wall','A snowy path through the woods','A galaxy with colorful gases','A mountain range during sunset','A bridge lit up at night','A close-up of a snail on a leaf','A field of daisies under a blue sky','A coral reef with exotic fish','A hot air balloon over mountains','A futuristic spaceship in space','A rainbow over a waterfall','A forest with sunbeams through trees','A lion resting in the grass','A castle surrounded by a moat','A crystal ball on a stand','A forest floor with mushrooms','A sunset over the ocean waves','A snowy owl in flight','A robot in a cityscape','A meadow with butterflies','A mountain reflected in a lake','A colorful nebula in space','A thunderstorm over fields','A coral reef with sea horses','A desert with a single cactus','An old shipwreck on the beach','A galaxy with shooting stars','A windmill under a cloudy sky','A tiger walking through the jungle','A futuristic city with neon lights','A hot air balloon over fields','A waterfall in a tropical setting','A field of lavender in bloom','A close-up of a dragonfly wing','A robot with glowing eyes','A snowy landscape at dawn','A galaxy with swirling colors','A lighthouse during sunset','A peacock feather in detail','A meadow with grazing horses','A coral reef with manta rays','A mountain covered in fog','A desert with a mirage','A close-up of a crystal','A rainbow over green hills','A futuristic skyline','A galaxy with planets aligning','A forest with autumn colors','A robot standing in a field','A snowy mountain under stars','A waterfall in a forest','A meadow with wildflowers','A desert landscape at dusk','A coral reef with colorful fish','A close-up of a sunflower','A lighthouse on a cliff','A futuristic vehicle in motion','A field of wheat waving in the wind','A galaxy with bright stars','A robot hand reaching out','A mountain range at sunrise','A rainbow over the ocean','A forest with fog','A butterfly on a leaf','A hot air balloon at sunrise','A coral reef with jellyfish','A desert with rock formations','A field of sunflowers','A robot in a futuristic city','A snowy landscape with aurora','A waterfall in a canyon','A close-up of a leaf vein','A galaxy with cosmic dust','A lighthouse in a storm','A meadow with grazing cows','A mountain reflected in water','A rainbow over mountains','A robot exploring ruins','A forest with sun rays','A hot air balloon over a lake','A coral reef with starfish','A desert landscape with cacti','A field of lavender at sunset','A futuristic city with flying vehicles','A galaxy with multiple planets','A close-up of a water droplet','A snowy mountain peak','A waterfall in the mountains','A meadow with daisies','A robot looking at the stars','A rainbow over a forest','A butterfly garden in bloom','A desert with a lone tree','A coral reef with coral formations','A mountain landscape in autumn','A hot air balloon over fields','A forest with colorful leaves','A robot in a lab','A galaxy with spiral arms','A lighthouse by the sea','A waterfall with a rainbow','A meadow under a blue sky','A coral reef with bright colors','A mountain at dusk','A desert sunset','A robot with a glowing core','A butterfly resting on a flower','A galaxy with nebulae','A snowy landscape with trees','A hot air balloon festival','A forest with a clear stream','A meadow filled with poppies','A robot in a desert','A rainbow over a city','A mountain range with snow','A coral reef with fish','A waterfall surrounded by rocks','A field of sunflowers','A galaxy with distant stars','A desert with dunes','A close-up of an insect wing','A robot in an industrial area','A snowy mountain under a full moon','A meadow with a small pond','A butterfly on a blade of grass','A hot air balloon over mountains','A forest with dense trees','A rainbow over a meadow','A coral reef with sea life','A mountain with a glacier','A robot standing on a hill','A galaxy with colorful gases','A waterfall in a tropical forest','A desert landscape at night','A meadow with wildflowers','A butterfly landing on a plant','A lighthouse guiding ships','A close-up of raindrops on petals','A robot reaching for the sky','A hot air balloon over vineyards','A snowy landscape with cabins','A galaxy with bright stars','A forest with mist','A coral reef with diverse life','A mountain during golden hour','A desert with a caravan of camels','A waterfall in a hidden valley','A rainbow over rolling hills','A robot exploring an alien world','A butterfly garden in spring','A meadow with tall grasses','A galaxy with twin suns','A hot air balloon above clouds','A coral reef with sharks','A mountain with a clear sky','A desert landscape with rocks','A waterfall into a clear pool','A rainbow over a lighthouse' + ] + + lightings = [ + 'Accent Lighting','Ambient Lighting','Artificial Lighting','Backlighting','Bicolor Lighting','Bottom Lighting','Bounce Lighting','Candlelight','Chiaroscuro','Chromatic Lighting','Colored Lighting','Cross Lighting','Diffuse Lighting','Directional Lighting','Direct Lighting','Dramatic Lighting','Edge Lighting','Fill Lighting','Firelight','Flat Lighting','Fluorescent Lighting','Frontal Lighting','Frosted Lighting','Gaffer Lighting','Glamour Lighting','Golden Hour','Halo Lighting','Hard Light','High Key','Incandescent Lighting','Industrial Lighting','Interior Lighting','Kicker Lighting','LED Lighting','Low Key','Magic Hour','Moonlight','Morning Light','Motivated Lighting','Natural Light','Neon Lighting','Night Lighting','Outdoor Lighting','Overhead Lighting','Overcast','Practical Lighting','Profile Lighting','Prop Lighting','Puddle Lighting','Radiant Lighting','Reflective Lighting','Rembrandt Lighting','Rim Lighting','Ring Light','Sidelight','Side Lighting','Silhouette Lighting','Soft Light','Specular Lighting','Spotlight','Starlight','Strip Lighting','Studio Lighting','Strobe Lighting','Subsurface Scattering','Sunbeam Lighting','Sunlight','Sunrise','Sunset','Surface Lighting','Top Lighting','Track Lighting','Tungsten Lighting','Twilight Lighting','Underexposed Lighting','Underwater Lighting','UV Lighting','Warm Lighting','Water Reflected Lighting','Window Lighting','Winter Lighting','Xenon Lighting','Candle Glow','Crossover Lighting','Diffraction Lighting','Electric Glow','Filament Lighting','Flickering Light','Fluorescence Light','Ghost Lighting','Incandescent Glow','LED Glow','Lightning Bolt','Moon Glow','Neon Glow','Night Glow','Overhead Glow','Pinhole Light','Rim Glow','Side Glow','Twilight Glow','Sunset Glow' + ] + + @classmethod + def INPUT_TYPES(cls): + return { + "required": { + "randomize": (["enable", "disable"],), + "seed": ("INT", {"default": 0, "min": 0, "max": 999999999}), + "style": (cls.styles,), + "subject": (cls.subjects,), + "color_palette": (cls.color_palettes,), + "lighting": (cls.lightings,) + } + } + + RETURN_TYPES = ("STRING", "STRING", "STRING", "STRING", "STRING", "INT",) # All strings except seed + RETURN_NAMES = ("all", "subject", "style", "color_palette", "lighting", "seed",) + FUNCTION = "choose_style_palette_and_lighting" + CATEGORY = "Art/Styles" + + def choose_style_palette_and_lighting(self, randomize, seed, style, color_palette, lighting, subject): + if randomize == "enable": + if seed is not None and seed > 0: + random.seed(seed) + else: + seed = random.randint(0, 999999999) + random.seed(seed) + + style = random.choice(self.styles) + color_palette = random.choice(self.color_palettes) + lighting = random.choice(self.lightings) + subject = random.choice(self.subjects) + + # Create the combined prompt string + all_prompt = f"Subject: {subject}\nStyle: {style}\nColor Palette: {color_palette}\nLighting: {lighting}" + + # Return all values as strings except seed + return (all_prompt, subject, style, color_palette, lighting, seed) + +# Register the node with ComfyUI +NODE_CLASS_MAPPINGS.update({ + "IsulionPromptGenerator": IsulionPromptGenerator +}) + +# At the end of the file, after NODE_CLASS_MAPPINGS +NODE_DISPLAY_NAME_MAPPINGS = { + "IsulionPromptGenerator": "Isulion Prompt Generator ✨" +} diff --git a/isulion_time_of_day_generator.py b/isulion_time_of_day_generator.py new file mode 100644 index 0000000..25a03d7 --- /dev/null +++ b/isulion_time_of_day_generator.py @@ -0,0 +1,41 @@ +import random +from nodes import NODE_CLASS_MAPPINGS + +class Isulion_TimeOfDayGenerator: + times = [ + 'Dawn', 'Sunrise', 'Early Morning', 'Morning', 'Late Morning', 'Noon', + 'Early Afternoon', 'Afternoon', 'Late Afternoon', 'Golden Hour', + 'Sunset', 'Dusk', 'Twilight', 'Evening', 'Night', 'Midnight', + 'Blue Hour', 'First Light', 'Magic Hour', 'Civil Twilight', + 'Astronomical Twilight', 'Nautical Twilight', 'Witching Hour', + 'Pre-dawn', 'Post-sunset' + ] + + @classmethod + def INPUT_TYPES(cls): + return { + "required": { + "randomize": (["enable", "disable"],), + "seed": ("INT", {"default": 0, "min": 0, "max": 999999999}), + "time": (cls.times,) + } + } + + RETURN_TYPES = ("STRING", "INT",) + RETURN_NAMES = ("time", "seed",) + FUNCTION = "generate_time" + CATEGORY = "Art/Styles" + + def generate_time(self, randomize, seed, time): + if randomize == "enable": + if seed is not None and seed > 0: + random.seed(seed) + else: + seed = random.randint(0, 999999999) + random.seed(seed) + + time = random.choice(self.times) + + return (f"{time}", seed) + +# Remove NODE_CLASS_MAPPINGS and NODE_DISPLAY_NAME_MAPPINGS from here \ No newline at end of file diff --git a/isulion_weather_generator.py b/isulion_weather_generator.py new file mode 100644 index 0000000..795ac31 --- /dev/null +++ b/isulion_weather_generator.py @@ -0,0 +1,41 @@ +import random +from nodes import NODE_CLASS_MAPPINGS + +class Isulion_WeatherGenerator: + weather_conditions = [ + 'Sunny', 'Cloudy', 'Partly Cloudy', 'Overcast', 'Rainy', 'Heavy Rain', + 'Thunderstorm', 'Lightning Storm', 'Snowy', 'Blizzard', 'Foggy', 'Misty', + 'Clear Sky', 'Stormy', 'Windy', 'Breezy', 'Hazy', 'Dusty', 'Sandstorm', + 'Drizzle', 'Sleet', 'Hail', 'Rainbow', 'Double Rainbow', 'Aurora Borealis', + 'Heat Wave', 'Humid', 'Dry', 'Frost', 'Ice Storm', 'Tornado', 'Hurricane', + 'Tropical Storm', 'Monsoon', 'Clear Night', 'Starry Night' + ] + + @classmethod + def INPUT_TYPES(cls): + return { + "required": { + "randomize": (["enable", "disable"],), + "seed": ("INT", {"default": 0, "min": 0, "max": 999999999}), + "weather": (cls.weather_conditions,) + } + } + + RETURN_TYPES = ("STRING", "INT",) + RETURN_NAMES = ("weather", "seed",) + FUNCTION = "generate_weather" + CATEGORY = "Art/Styles" + + def generate_weather(self, randomize, seed, weather): + if randomize == "enable": + if seed is not None and seed > 0: + random.seed(seed) + else: + seed = random.randint(0, 999999999) + random.seed(seed) + + weather = random.choice(self.weather_conditions) + + return (f"{weather}", seed) + +# Remove NODE_CLASS_MAPPINGS and NODE_DISPLAY_NAME_MAPPINGS from here \ No newline at end of file