Add Insta OF paired prompt mode
This commit is contained in:
+146
-2
@@ -3,10 +3,24 @@ from __future__ import annotations
|
||||
import json
|
||||
|
||||
try:
|
||||
from .prompt_builder import build_prompt, build_seed_config_json, category_choices, subcategory_choices
|
||||
from .prompt_builder import (
|
||||
build_insta_of_options_json,
|
||||
build_insta_of_pair,
|
||||
build_prompt,
|
||||
build_seed_config_json,
|
||||
category_choices,
|
||||
subcategory_choices,
|
||||
)
|
||||
from .caption_naturalizer import naturalize_caption
|
||||
except ImportError:
|
||||
from prompt_builder import build_prompt, build_seed_config_json, category_choices, subcategory_choices
|
||||
from prompt_builder import (
|
||||
build_insta_of_options_json,
|
||||
build_insta_of_pair,
|
||||
build_prompt,
|
||||
build_seed_config_json,
|
||||
category_choices,
|
||||
subcategory_choices,
|
||||
)
|
||||
from caption_naturalizer import naturalize_caption
|
||||
|
||||
|
||||
@@ -196,14 +210,144 @@ class SxCPCaptionNaturalizer:
|
||||
)
|
||||
|
||||
|
||||
class SxCPInstaOFOptions:
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {
|
||||
"softcore_cast": (["solo", "same_as_hardcore"], {"default": "solo"}),
|
||||
"hardcore_cast": (["use_counts", "couple", "threesome", "group"], {"default": "use_counts"}),
|
||||
"hardcore_women_count": ("INT", {"default": 1, "min": 0, "max": 12, "step": 1}),
|
||||
"hardcore_men_count": ("INT", {"default": 1, "min": 0, "max": 12, "step": 1}),
|
||||
"softcore_level": (["social_tease", "lingerie_tease", "implied_nude", "explicit_tease"], {"default": "lingerie_tease"}),
|
||||
"hardcore_level": (["explicit", "hardcore"], {"default": "hardcore"}),
|
||||
"platform_style": (["hybrid", "instagram", "onlyfans"], {"default": "hybrid"}),
|
||||
"continuity": (["same_creator_same_room", "same_creator_new_scene"], {"default": "same_creator_same_room"}),
|
||||
}
|
||||
}
|
||||
|
||||
RETURN_TYPES = ("STRING",)
|
||||
RETURN_NAMES = ("options_json",)
|
||||
FUNCTION = "build"
|
||||
CATEGORY = "prompt_builder"
|
||||
|
||||
def build(
|
||||
self,
|
||||
softcore_cast,
|
||||
hardcore_cast,
|
||||
hardcore_women_count,
|
||||
hardcore_men_count,
|
||||
softcore_level,
|
||||
hardcore_level,
|
||||
platform_style,
|
||||
continuity,
|
||||
):
|
||||
return (
|
||||
build_insta_of_options_json(
|
||||
softcore_cast=softcore_cast,
|
||||
hardcore_cast=hardcore_cast,
|
||||
hardcore_women_count=hardcore_women_count,
|
||||
hardcore_men_count=hardcore_men_count,
|
||||
softcore_level=softcore_level,
|
||||
hardcore_level=hardcore_level,
|
||||
platform_style=platform_style,
|
||||
continuity=continuity,
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
class SxCPInstaOFPromptPair:
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {
|
||||
"row_number": ("INT", {"default": 1, "min": 1, "max": 1000000, "step": 1}),
|
||||
"start_index": ("INT", {"default": 41, "min": 1, "max": 1000000, "step": 1}),
|
||||
"seed": ("INT", {"default": 20260614, "min": 0, "max": 0xFFFFFFFF, "step": 1}),
|
||||
"ethnicity": (["any", "asian", "white_asian"], {"default": "any"}),
|
||||
"figure": (["curvy", "balanced", "bombshell"], {"default": "curvy"}),
|
||||
"no_plus_women": ("BOOLEAN", {"default": False}),
|
||||
"no_black": ("BOOLEAN", {"default": False}),
|
||||
"trigger": ("STRING", {"default": "sxcpinup_coloredpencil"}),
|
||||
"prepend_trigger_to_prompt": ("BOOLEAN", {"default": True}),
|
||||
},
|
||||
"optional": {
|
||||
"seed_config": ("STRING", {"default": "", "multiline": True}),
|
||||
"options_json": ("STRING", {"default": "", "multiline": True}),
|
||||
"extra_positive": ("STRING", {"default": "", "multiline": True}),
|
||||
"extra_negative": ("STRING", {"default": "", "multiline": True}),
|
||||
},
|
||||
}
|
||||
|
||||
RETURN_TYPES = ("STRING", "STRING", "STRING", "STRING", "STRING", "STRING", "STRING", "STRING")
|
||||
RETURN_NAMES = (
|
||||
"softcore_prompt",
|
||||
"hardcore_prompt",
|
||||
"softcore_negative_prompt",
|
||||
"hardcore_negative_prompt",
|
||||
"softcore_caption",
|
||||
"hardcore_caption",
|
||||
"shared_descriptor",
|
||||
"metadata_json",
|
||||
)
|
||||
FUNCTION = "build"
|
||||
CATEGORY = "prompt_builder"
|
||||
|
||||
def build(
|
||||
self,
|
||||
row_number,
|
||||
start_index,
|
||||
seed,
|
||||
ethnicity,
|
||||
figure,
|
||||
no_plus_women,
|
||||
no_black,
|
||||
trigger,
|
||||
prepend_trigger_to_prompt,
|
||||
seed_config="",
|
||||
options_json="",
|
||||
extra_positive="",
|
||||
extra_negative="",
|
||||
):
|
||||
row = build_insta_of_pair(
|
||||
row_number=row_number,
|
||||
start_index=start_index,
|
||||
seed=seed,
|
||||
ethnicity=ethnicity,
|
||||
figure=figure,
|
||||
no_plus_women=no_plus_women,
|
||||
no_black=no_black,
|
||||
trigger=trigger,
|
||||
prepend_trigger_to_prompt=prepend_trigger_to_prompt,
|
||||
seed_config=seed_config or "",
|
||||
options_json=options_json or "",
|
||||
extra_positive=extra_positive or "",
|
||||
extra_negative=extra_negative or "",
|
||||
)
|
||||
return (
|
||||
row["softcore_prompt"],
|
||||
row["hardcore_prompt"],
|
||||
row["softcore_negative_prompt"],
|
||||
row["hardcore_negative_prompt"],
|
||||
row["softcore_caption"],
|
||||
row["hardcore_caption"],
|
||||
row["shared_descriptor"],
|
||||
json.dumps(row, ensure_ascii=True, sort_keys=True),
|
||||
)
|
||||
|
||||
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
"SxCPPromptBuilder": SxCPPromptBuilder,
|
||||
"SxCPSeedControl": SxCPSeedControl,
|
||||
"SxCPCaptionNaturalizer": SxCPCaptionNaturalizer,
|
||||
"SxCPInstaOFOptions": SxCPInstaOFOptions,
|
||||
"SxCPInstaOFPromptPair": SxCPInstaOFPromptPair,
|
||||
}
|
||||
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
"SxCPPromptBuilder": "SxCP Prompt Builder",
|
||||
"SxCPSeedControl": "SxCP Seed Control",
|
||||
"SxCPCaptionNaturalizer": "SxCP Caption Naturalizer",
|
||||
"SxCPInstaOFOptions": "SxCP Insta/OF Options",
|
||||
"SxCPInstaOFPromptPair": "SxCP Insta/OF Prompt Pair",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user