Add SDXL formatter profiles
This commit is contained in:
+11
-2
@@ -23,6 +23,7 @@ TRIGGER_CANDIDATES = (
|
||||
|
||||
SDXL_STYLE_PRESETS = sdxl_policy.SDXL_STYLE_PRESETS
|
||||
SDXL_QUALITY_PRESETS = sdxl_policy.SDXL_QUALITY_PRESETS
|
||||
SDXL_FORMATTER_PROFILES = sdxl_policy.SDXL_FORMATTER_PROFILES
|
||||
SDXL_DEFAULT_NEGATIVE = sdxl_policy.SDXL_DEFAULT_NEGATIVE
|
||||
SDXL_ACTION_FAMILY_TAGS = sdxl_policy.SDXL_ACTION_FAMILY_TAGS
|
||||
SDXL_POSITION_FAMILY_TAGS = sdxl_policy.SDXL_POSITION_FAMILY_TAGS
|
||||
@@ -38,6 +39,10 @@ def sdxl_quality_preset_choices() -> list[str]:
|
||||
return sdxl_policy.sdxl_quality_preset_choices()
|
||||
|
||||
|
||||
def sdxl_formatter_profile_choices() -> list[str]:
|
||||
return sdxl_policy.sdxl_formatter_profile_choices()
|
||||
|
||||
|
||||
def _clean(value: Any) -> str:
|
||||
return input_policy.clean_text(value)
|
||||
|
||||
@@ -436,9 +441,13 @@ def format_sdxl_prompt(
|
||||
custom_quality: str = "",
|
||||
extra_positive: str = "",
|
||||
extra_negative: str = "",
|
||||
formatter_profile: str = "manual_controls",
|
||||
) -> dict[str, str]:
|
||||
style_preset = sdxl_policy.normalize_style_preset(style_preset)
|
||||
quality_preset = sdxl_policy.normalize_quality_preset(quality_preset)
|
||||
style_preset, quality_preset = sdxl_policy.apply_formatter_profile(
|
||||
formatter_profile,
|
||||
style_preset=style_preset,
|
||||
quality_preset=quality_preset,
|
||||
)
|
||||
target = target if target in ("auto", "single", "softcore", "hardcore") else "auto"
|
||||
nude_weight = max(0.1, min(3.0, float(nude_weight)))
|
||||
row, method = _row_from_inputs(source_text, metadata_json, input_hint)
|
||||
|
||||
Reference in New Issue
Block a user