Added Fantasy Setting
This commit is contained in:
@@ -780,6 +780,102 @@ class SDXLPromptStylerbyOriginal:
|
||||
|
||||
return positive_prompt, negative_prompt
|
||||
|
||||
class SDXLPromptStylerbyMileHigh:
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(self):
|
||||
# Get current file's directory
|
||||
p = os.path.dirname(os.path.realpath(__file__))
|
||||
# Construct 'sdxl_styles.json' path
|
||||
file_path = os.path.join(p, 'sdxl_styles_mh.json')
|
||||
|
||||
# Read JSON from file
|
||||
self.json_data = read_json_file(file_path)
|
||||
# Retrieve styles from JSON data
|
||||
styles = read_sdxl_styles(self.json_data)
|
||||
|
||||
return {
|
||||
"required": {
|
||||
"text_positive": ("STRING", {"default": "", "multiline": True}),
|
||||
"text_negative": ("STRING", {"default": "", "multiline": True}),
|
||||
"style": ((styles), ),
|
||||
"log_prompt": (["No", "Yes"], {"default":"No"}),
|
||||
},
|
||||
}
|
||||
|
||||
RETURN_TYPES = ('STRING','STRING',)
|
||||
RETURN_NAMES = ('positive_prompt_text_g','negative_prompt_text_g',)
|
||||
FUNCTION = 'prompt_styler'
|
||||
CATEGORY = 'Style Prompts'
|
||||
|
||||
def prompt_styler(self, text_positive, text_negative, style, log_prompt):
|
||||
# Process and combine prompts in templates
|
||||
# The function replaces the positive prompt placeholder in the template,
|
||||
# and combines the negative prompt with the template's negative prompt, if they exist.
|
||||
positive_prompt, negative_prompt = read_sdxl_templates_replace_and_combine(self.json_data, style, text_positive, text_negative)
|
||||
|
||||
# If logging is enabled (log_prompt is set to "Yes"),
|
||||
# print the style, positive and negative text, and positive and negative prompts to the console
|
||||
if log_prompt == "Yes":
|
||||
print(f"style: {style}")
|
||||
print(f"text_positive: {text_positive}")
|
||||
print(f"text_negative: {text_negative}")
|
||||
print(f"positive_prompt: {positive_prompt}")
|
||||
print(f"negative_prompt: {negative_prompt}")
|
||||
|
||||
return positive_prompt, negative_prompt
|
||||
|
||||
class SDXLPromptStylerbyFantasySetting:
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(self):
|
||||
# Get current file's directory
|
||||
p = os.path.dirname(os.path.realpath(__file__))
|
||||
# Construct 'sdxl_styles.json' path
|
||||
file_path = os.path.join(p, 'sdxl_styles_fs.json')
|
||||
|
||||
# Read JSON from file
|
||||
self.json_data = read_json_file(file_path)
|
||||
# Retrieve styles from JSON data
|
||||
styles = read_sdxl_styles(self.json_data)
|
||||
|
||||
return {
|
||||
"required": {
|
||||
"text_positive": ("STRING", {"default": "", "multiline": True}),
|
||||
"text_negative": ("STRING", {"default": "", "multiline": True}),
|
||||
"style": ((styles), ),
|
||||
"log_prompt": (["No", "Yes"], {"default":"No"}),
|
||||
},
|
||||
}
|
||||
|
||||
RETURN_TYPES = ('STRING','STRING',)
|
||||
RETURN_NAMES = ('positive_prompt_text_g','negative_prompt_text_g',)
|
||||
FUNCTION = 'prompt_styler'
|
||||
CATEGORY = 'Style Prompts'
|
||||
|
||||
def prompt_styler(self, text_positive, text_negative, style, log_prompt):
|
||||
# Process and combine prompts in templates
|
||||
# The function replaces the positive prompt placeholder in the template,
|
||||
# and combines the negative prompt with the template's negative prompt, if they exist.
|
||||
positive_prompt, negative_prompt = read_sdxl_templates_replace_and_combine(self.json_data, style, text_positive, text_negative)
|
||||
|
||||
# If logging is enabled (log_prompt is set to "Yes"),
|
||||
# print the style, positive and negative text, and positive and negative prompts to the console
|
||||
if log_prompt == "Yes":
|
||||
print(f"style: {style}")
|
||||
print(f"text_positive: {text_positive}")
|
||||
print(f"text_negative: {text_negative}")
|
||||
print(f"positive_prompt: {positive_prompt}")
|
||||
print(f"negative_prompt: {negative_prompt}")
|
||||
|
||||
return positive_prompt, negative_prompt
|
||||
|
||||
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
"SDXLPromptStylerbyArtist": SDXLPromptStylerbyArtist,
|
||||
@@ -787,10 +883,12 @@ NODE_CLASS_MAPPINGS = {
|
||||
"SDXLPromptStylerbyComposition": SDXLPromptStylerbyComposition,
|
||||
"SDXLPromptStylerbyDepth": SDXLPromptStylerbyDepth,
|
||||
"SDXLPromptStylerbyEnvironment": SDXLPromptStylerbyEnvironment,
|
||||
"SDXLPromptStylerbyFantasySetting": SDXLPromptStylerbyFantasySetting,
|
||||
"SDXLPromptStylerbyFilter": SDXLPromptStylerbyFilter,
|
||||
"SDXLPromptStylerbyFocus": SDXLPromptStylerbyFocus,
|
||||
"SDXLPromptStylerHorror": SDXLPromptStylerHorror,
|
||||
"SDXLPromptStylerbyLighting": SDXLPromptStylerbyLighting,
|
||||
"SDXLPromptStylerbyMileHigh": SDXLPromptStylerbyMileHigh,
|
||||
"SDXLPromptStylerMisc": SDXLPromptStylerMisc,
|
||||
"SDXLPromptStylerbyMood": SDXLPromptStylerbyMood,
|
||||
"SDXLPromptStylerbyOriginal": SDXLPromptStylerbyOriginal,
|
||||
@@ -805,10 +903,12 @@ NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
"SDXLPromptStylerbyComposition": "Prompt Styler Composition",
|
||||
"SDXLPromptStylerbyDepth": "Prompt Styler Depth",
|
||||
"SDXLPromptStylerbyEnvironment": "Prompt Styler Environment",
|
||||
"SDXLPromptStylerbyFantasySetting": "Prompt Styler Fantasy-Setting",
|
||||
"SDXLPromptStylerbyFilter": "Prompt Styler Filter",
|
||||
"SDXLPromptStylerbyFocus": "Prompt Styler Focus",
|
||||
"SDXLPromptStylerHorror": "Prompt Styler Horror",
|
||||
"SDXLPromptStylerbyLighting": "Prompt Styler Lighting",
|
||||
"SDXLPromptStylerbyMileHigh": "Prompt Styler MileHigh",
|
||||
"SDXLPromptStylerMisc": "Prompt Styler Misc",
|
||||
"SDXLPromptStylerbyMood": "Prompt Styler Mood",
|
||||
"SDXLPromptStylerbyOriginal": "Prompt Styler Original",
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
[
|
||||
{
|
||||
"name": "none byFantasy-Settings",
|
||||
"prompt": "{prompt}",
|
||||
"negative_prompt": ""
|
||||
},
|
||||
{
|
||||
"name": "Atlantis",
|
||||
"prompt": "A lost city of great wisdom and power, now drowned beneath the sea",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Enchanted Forest",
|
||||
"prompt": "An enchanted forest where magical creatures and plants abound, shrouded in an aura of enchantment, where ancient trees whisper secrets, mythical creatures roam, and the very air seems to vibrate with untold magic.",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Fairyland",
|
||||
"prompt": "A place where fairies and other magical creatures live, a whimsical and enchanting realm ethereal beauty, and endless adventures where the ordinary meets the extraordinary",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Fairytale",
|
||||
"prompt": "A fairytale land where magical creatures live and thrive",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Foreboding Castle",
|
||||
"prompt": "A dark, foreboding castle where a wicked queen reigns",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Middle Earth",
|
||||
"prompt": "A vast and ancient world, home to Elves, Dwarves, Hobbits, and Wizards",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Magical Kingdom",
|
||||
"prompt": "A magical kingdom where everything is perfect and everyone is happy",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Mordor",
|
||||
"prompt": "A dark and evil land ruled by the dark lord Sauron, volcanic landscapes, oppressive darkness,",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Narnia",
|
||||
"prompt": "A land of talking animals and magical creatures, ruled by Aslan the lion",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Neverland",
|
||||
"prompt": ":A lost island where children can stay forever young",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Shambhala",
|
||||
"prompt": "A hidden paradise where enlightened beings live in perfect harmony",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "The Crystal Cave",
|
||||
"prompt": "A fantastical place where gemstones and crystals grow in abundance",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "The Dragon's Lair",
|
||||
"prompt": "A deadly place where fearsome dragons dwell",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "The Forest of Mirrors",
|
||||
"prompt": "A place where reality is distorted and nothing is as it seems",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "The Island of Dreams",
|
||||
"prompt": "A place where all your deepest desires come true",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "The Kingdom of the Unicorn",
|
||||
"prompt": "A mystical realm where these elegant and elusive creatures reign, a land of enchantment and wonder where the very air seems to shimmer with magic",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "The Palace of Dreams",
|
||||
"prompt": "A surreal and enigmatic literary work by Albanian author Ismail Kadare, where a mysterious government agency interprets citizens' dreams in a totalitarian society, exploring themes of control, surveillance, and the power of the subconscious",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "The Tower of Oblivion",
|
||||
"prompt": "A stronghold where forgotten secrets and dark magic are hidden",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "The Vale of Shadows",
|
||||
"prompt": "A dark and foreboding valley where no sunlight ever penetrates",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "The Valley of the Damned",
|
||||
"prompt": "A forsaken and eerie location, where darkness reigns and the echoes of past transgressions haunt its desolate landscape",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "The Valley of the Lost",
|
||||
"prompt": "A mystical and secluded place shrouded in secrets, where untamed nature meets ancient mysteries waiting to be uncovered",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Tropical Paradise",
|
||||
"prompt": "A tropical paradise where the sun shines brightly every day",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Oz",
|
||||
"prompt": "A land of enchantment, where anything is possible",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Wonderland",
|
||||
"prompt": "A wild and fantastical place, ruled by the Queen of Hearts",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Xanadu",
|
||||
"prompt": "A magical kingdom ruled by a wise and benevolent queen",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
}
|
||||
]
|
||||
+103
-8
@@ -1,18 +1,113 @@
|
||||
[
|
||||
{
|
||||
"name": "none byOriginal",
|
||||
"name": "none byFantasy-Settings",
|
||||
"prompt": "{prompt}",
|
||||
"negative_prompt": ""
|
||||
},
|
||||
{
|
||||
"name": "sai-3d-model",
|
||||
"prompt": "professional 3d model {prompt} . octane render, highly detailed, volumetric, dramatic lighting",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry, painting"
|
||||
{
|
||||
"name": "Atlantis",
|
||||
"prompt": "A lost city of great wisdom and power, now drowned beneath the sea",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Enchanted Forest",
|
||||
"prompt": "An enchanted forest where magical creatures and plants abound",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Fairyland",
|
||||
"prompt": "A place where fairies and other magical creatures live",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Fairytale",
|
||||
"prompt": "A fairytale land where magical creatures live and thrive",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "sai-analog film",
|
||||
"prompt": "analog film photo {prompt} . faded film, desaturated, 35mm photo, grainy, vignette, vintage, Kodachrome, Lomography, stained, highly detailed, found footage",
|
||||
"negative_prompt": "painting, drawing, illustration, glitch, deformed, mutated, cross-eyed, ugly, disfigured"
|
||||
"name": "Foreboding Castle",
|
||||
"prompt": "A dark, foreboding castle where a wicked queen reigns",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Middle Earth",
|
||||
"prompt": "A vast and ancient world, home to Elves, Dwarves, Hobbits, and Wizards",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Magical Kingdom",
|
||||
"prompt": "A magical kingdom where everything is perfect and everyone is happy",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Mordor",
|
||||
"prompt": "A dark and evil land ruled by the dark lord Sauron",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Narnia",
|
||||
"prompt": "A land of talking animals and magical creatures, ruled by Aslan the lion",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Neverland",
|
||||
"prompt": ":A lost island where children can stay forever young",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Shambhala",
|
||||
"prompt": "A hidden paradise where enlightened beings live in perfect harmony",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "The Crystal Cave",
|
||||
"prompt": "A fantastical place where gemstones and crystals grow in abundance",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "The Dragon's Lair",
|
||||
"prompt": "A deadly place where fearsome dragons dwell",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "The Forest of Mirrors",
|
||||
"prompt": "A place where reality is distorted and nothing is as it seems",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "The Island of Dreams",
|
||||
"prompt": "A place where all your deepest desires come true",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "The Tower of Oblivion",
|
||||
"prompt": "A stronghold where forgotten secrets and dark magic are hidden",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "The Vale of Shadows",
|
||||
"prompt": "A dark and foreboding valley where no sunlight ever penetrates",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Tropical Paradise",
|
||||
"prompt": "A tropical paradise where the sun shines brightly every day",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Oz",
|
||||
"prompt": "A land of enchantment, where anything is possible",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Wonderland",
|
||||
"prompt": "A wild and fantastical place, ruled by the Queen of Hearts",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "Xanadu",
|
||||
"prompt": "A magical kingdom ruled by a wise and benevolent queen",
|
||||
"negative_prompt": "ugly, deformed, noisy, low poly, blurry,"
|
||||
},
|
||||
{
|
||||
"name": "sai-anime",
|
||||
|
||||
Reference in New Issue
Block a user