Expose formatter route traces
This commit is contained in:
+11
-7
@@ -1,7 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
try:
|
||||
from .caption_naturalizer import naturalize_caption
|
||||
from .caption_naturalizer import naturalize_caption_with_trace
|
||||
from .caption_policy import caption_profile_choices, style_policy_choices
|
||||
from .formatter_detail import detail_level_choices
|
||||
from .formatter_input import INPUT_HINT_CAPTION_OR_PROMPT, INPUT_HINT_PROMPT, input_hint_choices
|
||||
@@ -15,7 +15,7 @@ try:
|
||||
sdxl_style_preset_choices,
|
||||
)
|
||||
except ImportError: # Allows local smoke tests from the repository root.
|
||||
from caption_naturalizer import naturalize_caption
|
||||
from caption_naturalizer import naturalize_caption_with_trace
|
||||
from caption_policy import caption_profile_choices, style_policy_choices
|
||||
from formatter_detail import detail_level_choices
|
||||
from formatter_input import INPUT_HINT_CAPTION_OR_PROMPT, INPUT_HINT_PROMPT, input_hint_choices
|
||||
@@ -50,8 +50,8 @@ class SxCPCaptionNaturalizer:
|
||||
},
|
||||
}
|
||||
|
||||
RETURN_TYPES = ("STRING", "STRING")
|
||||
RETURN_NAMES = ("natural_caption", "method")
|
||||
RETURN_TYPES = ("STRING", "STRING", "STRING")
|
||||
RETURN_NAMES = ("natural_caption", "method", "route_trace_json")
|
||||
FUNCTION = "build"
|
||||
CATEGORY = "prompt_builder"
|
||||
|
||||
@@ -69,7 +69,7 @@ class SxCPCaptionNaturalizer:
|
||||
metadata_json="",
|
||||
):
|
||||
active_source_text = source_text_input or source_text or ""
|
||||
return naturalize_caption(
|
||||
return naturalize_caption_with_trace(
|
||||
source_text=active_source_text,
|
||||
metadata_json=metadata_json or "",
|
||||
input_hint=input_hint,
|
||||
@@ -103,7 +103,7 @@ class SxCPKrea2Formatter:
|
||||
},
|
||||
}
|
||||
|
||||
RETURN_TYPES = ("STRING", "STRING", "STRING", "STRING", "STRING", "STRING", "STRING")
|
||||
RETURN_TYPES = ("STRING", "STRING", "STRING", "STRING", "STRING", "STRING", "STRING", "STRING")
|
||||
RETURN_NAMES = (
|
||||
"krea_prompt",
|
||||
"negative_prompt",
|
||||
@@ -112,6 +112,7 @@ class SxCPKrea2Formatter:
|
||||
"softcore_negative_prompt",
|
||||
"hardcore_negative_prompt",
|
||||
"method",
|
||||
"route_trace_json",
|
||||
)
|
||||
FUNCTION = "build"
|
||||
CATEGORY = "prompt_builder"
|
||||
@@ -151,6 +152,7 @@ class SxCPKrea2Formatter:
|
||||
row["softcore_negative_prompt"],
|
||||
row["hardcore_negative_prompt"],
|
||||
row["method"],
|
||||
row["route_trace_json"],
|
||||
)
|
||||
|
||||
|
||||
@@ -181,7 +183,7 @@ class SxCPSDXLFormatter:
|
||||
},
|
||||
}
|
||||
|
||||
RETURN_TYPES = ("STRING", "STRING", "STRING", "STRING", "STRING", "STRING", "STRING")
|
||||
RETURN_TYPES = ("STRING", "STRING", "STRING", "STRING", "STRING", "STRING", "STRING", "STRING")
|
||||
RETURN_NAMES = (
|
||||
"sdxl_prompt",
|
||||
"negative_prompt",
|
||||
@@ -190,6 +192,7 @@ class SxCPSDXLFormatter:
|
||||
"softcore_negative_prompt",
|
||||
"hardcore_negative_prompt",
|
||||
"method",
|
||||
"route_trace_json",
|
||||
)
|
||||
FUNCTION = "build"
|
||||
CATEGORY = "prompt_builder"
|
||||
@@ -241,6 +244,7 @@ class SxCPSDXLFormatter:
|
||||
row["softcore_negative_prompt"],
|
||||
row["hardcore_negative_prompt"],
|
||||
row["method"],
|
||||
row["route_trace_json"],
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user