Expose Krea formatter metadata socket
This commit is contained in:
@@ -148,9 +148,9 @@ recoverable.
|
||||
| `SxCP Prompt Builder` | category, subcategory, seed, optional config nodes | `prompt`, `negative_prompt`, `caption`, `metadata_json`, `category`, `subcategory` |
|
||||
| `SxCP Prompt Builder From Configs` | category/cast/profile/filter/config node outputs | Same as `SxCP Prompt Builder` |
|
||||
| `SxCP Insta/OF Prompt Pair` | options, seed_config, character_cast, location/composition/camera, hardcore_position_config | `softcore_prompt`, `hardcore_prompt`, both negatives, both captions, `shared_descriptor`, `metadata_json` |
|
||||
| `SxCP Krea2 Formatter` | `source_text`, optional `metadata_json`, target | `krea_prompt`, both pair prompts if pair metadata exists, negative outputs, method |
|
||||
| `SxCP SDXL Formatter` | `source_text`, optional `metadata_json`, target, style/quality preset | `sdxl_prompt`, both pair prompts if pair metadata exists, negative outputs, method |
|
||||
| `SxCP Caption Naturalizer` | `source_text`, optional `metadata_json` | `natural_caption`, method |
|
||||
| `SxCP Krea2 Formatter` | `source_text`, connectable `metadata_json`, target | `krea_prompt`, both pair prompts if pair metadata exists, negative outputs, method |
|
||||
| `SxCP SDXL Formatter` | `source_text`, connectable `metadata_json`, target, style/quality preset | `sdxl_prompt`, both pair prompts if pair metadata exists, negative outputs, method |
|
||||
| `SxCP Caption Naturalizer` | `source_text`, connectable `metadata_json` | `natural_caption`, method |
|
||||
|
||||
## Practical Recipes
|
||||
|
||||
|
||||
+6
-3
@@ -84,8 +84,9 @@ class SxCPKrea2Formatter:
|
||||
"preserve_trigger": ("BOOLEAN", {"default": False}),
|
||||
},
|
||||
"optional": {
|
||||
"metadata_json": ("STRING", {"default": "", "multiline": True}),
|
||||
"negative_prompt": ("STRING", {"default": "", "multiline": True}),
|
||||
"source_text_input": ("STRING", {"forceInput": True}),
|
||||
"metadata_json": ("STRING", {"forceInput": True}),
|
||||
"negative_prompt": ("STRING", {"forceInput": True}),
|
||||
"extra_positive": ("STRING", {"default": "", "multiline": True}),
|
||||
"extra_negative": ("STRING", {"default": "", "multiline": True}),
|
||||
},
|
||||
@@ -112,13 +113,15 @@ class SxCPKrea2Formatter:
|
||||
detail_level,
|
||||
style_mode,
|
||||
preserve_trigger,
|
||||
source_text_input="",
|
||||
metadata_json="",
|
||||
negative_prompt="",
|
||||
extra_positive="",
|
||||
extra_negative="",
|
||||
):
|
||||
active_source_text = source_text_input or source_text or ""
|
||||
row = format_krea2_prompt(
|
||||
source_text=source_text or "",
|
||||
source_text=active_source_text,
|
||||
metadata_json=metadata_json or "",
|
||||
negative_prompt=negative_prompt or "",
|
||||
input_hint=input_hint,
|
||||
|
||||
@@ -5799,6 +5799,11 @@ def smoke_node_formatter_registration() -> None:
|
||||
krea_inputs = krea_node.INPUT_TYPES().get("required") or {}
|
||||
_expect("source_text" in krea_inputs, "Krea2 Formatter lost source_text input")
|
||||
_expect("tooltip" in krea_inputs["source_text"][1], "Krea2 Formatter tooltip injection missing")
|
||||
krea_optional = krea_node.INPUT_TYPES().get("optional") or {}
|
||||
_expect("source_text_input" in krea_optional, "Krea2 Formatter lost connectable source_text_input")
|
||||
_expect("metadata_json" in krea_optional, "Krea2 Formatter lost metadata_json input")
|
||||
_expect(krea_optional["metadata_json"][1].get("forceInput") is True, "Krea2 Formatter metadata_json should be connectable")
|
||||
_expect(krea_optional["negative_prompt"][1].get("forceInput") is True, "Krea2 Formatter negative_prompt should be connectable")
|
||||
|
||||
caption, caption_method = sxcp_nodes.NODE_CLASS_MAPPINGS["SxCPCaptionNaturalizer"]().build(
|
||||
"A woman standing by a window, best quality",
|
||||
|
||||
Reference in New Issue
Block a user