Merge branch seed configs in scene pair output
This commit is contained in:
+8
-1
@@ -475,6 +475,13 @@ def _merge_seed_config(seed_config: Any, axes: tuple[str, ...], seed: int) -> st
|
||||
return _dump(config)
|
||||
|
||||
|
||||
def _combined_seed_config(*seed_configs: Any) -> str:
|
||||
combined: dict[str, Any] = {}
|
||||
for seed_config in seed_configs:
|
||||
combined.update(_json_dict(seed_config))
|
||||
return _dump(combined) if combined else ""
|
||||
|
||||
|
||||
def _apply_layer_seed(scene: dict[str, Any], layer_name: str, seed_options: Any, branch_name: str = "") -> None:
|
||||
items = _seed_option_items(seed_options)
|
||||
if not items:
|
||||
@@ -2284,7 +2291,7 @@ class SxCPScenePairOutput:
|
||||
no_black=False,
|
||||
trigger=str(soft_scene.get("trigger") or "sxcpinup_coloredpencil"),
|
||||
prepend_trigger_to_prompt=bool(soft_scene.get("prepend_trigger_to_prompt", True)),
|
||||
seed_config=base_configs["seed_config"] or hard_configs["seed_config"],
|
||||
seed_config=_combined_seed_config(base_configs["seed_config"], hard_configs["seed_config"]),
|
||||
options_json=options_json,
|
||||
filter_config=base_configs["filter_config"] or hard_configs["filter_config"],
|
||||
camera_config=base_configs["camera_config"],
|
||||
|
||||
@@ -9172,6 +9172,14 @@ def smoke_node_scene_chain_registration() -> None:
|
||||
pair.get("scene_chain", {}).get("hardcore", {}).get("seed_trace", {}).get("hardcore.hardcore_branch", {}).get("seed") == 7799,
|
||||
"Scene branch seed options did not write hardcore branch seed trace",
|
||||
)
|
||||
hard_seed_config = pair.get("hardcore_row", {}).get("seed_config") if isinstance(pair.get("hardcore_row"), dict) else {}
|
||||
_expect(hard_seed_config.get("pose_seed") == 7799, "Scene Pair Output did not pass hardcore branch pose seed to generator")
|
||||
_expect(hard_seed_config.get("role_seed") == 7799, "Scene Pair Output did not pass hardcore branch role seed to generator")
|
||||
hard_trace_axes = pair.get("hardcore_row", {}).get("generation_trace", {}).get("seed_axes", {}) if isinstance(pair.get("hardcore_row"), dict) else {}
|
||||
_expect(
|
||||
hard_trace_axes.get("pose", {}).get("seed") == 7799,
|
||||
"Scene Pair Output generation trace did not use hardcore branch pose seed",
|
||||
)
|
||||
|
||||
|
||||
def smoke_node_builder_registration() -> None:
|
||||
|
||||
Reference in New Issue
Block a user