Route pair metadata structurally
This commit is contained in:
@@ -4,8 +4,10 @@ from dataclasses import dataclass
|
||||
from typing import Any, Callable
|
||||
|
||||
try:
|
||||
from . import formatter_input as input_policy
|
||||
from . import formatter_target as target_policy
|
||||
except ImportError: # pragma: no cover - plain-script smoke tests
|
||||
import formatter_input as input_policy
|
||||
import formatter_target as target_policy
|
||||
|
||||
|
||||
@@ -65,7 +67,7 @@ def format_sdxl_prompt_result(request: SDXLFormatRequest, deps: SDXLFormatDepend
|
||||
nude_weight = max(0.1, min(3.0, float(request.nude_weight)))
|
||||
row, method = deps.row_from_inputs(request.source_text, request.metadata_json, request.input_hint)
|
||||
|
||||
if row and row.get("mode") == "Insta/OF":
|
||||
if row and input_policy.is_pair_metadata(row):
|
||||
pair_target = target_policy.pair_policy(target)
|
||||
soft_row = row.get("softcore_row") if isinstance(row.get("softcore_row"), dict) else {}
|
||||
hard_row = row.get("hardcore_row") if isinstance(row.get("hardcore_row"), dict) else {}
|
||||
|
||||
Reference in New Issue
Block a user