calesthio/OpenMontage · error · ValueError
Conflicting sound_end_time values between top-level input an
Error message
Conflicting sound_end_time values between top-level input and face_choose[0]
What it means
Raised by KlingLipSyncTool._copy_timing_fields when sound_end_time is provided both at the top level and in face_choose[0] with different int values. Same fail-fast contract as the other timing fields: the tool will not arbitrate between two conflicting crop-end values.
Source
Thrown at tools/avatar/kling_lip_sync.py:555
nested = face_item.get(key)
top_level = inputs.get(key)
if nested is not None and top_level is not None and int(nested) != int(top_level):
raise ValueError(
f"Conflicting {key} values between top-level input and face_choose[0]"
)
value = nested if nested is not None else top_level
if value is None:
value = default
face_item[key] = int(value)
nested_end = face_item.get("sound_end_time")
top_level_end = inputs.get("sound_end_time")
if (
nested_end is not None
and top_level_end is not None
and int(nested_end) != int(top_level_end)
):
raise ValueError(
"Conflicting sound_end_time values between top-level input and face_choose[0]"
)
sound_end = nested_end if nested_end is not None else top_level_end
if sound_end is None:
raise ValueError("advanced_lip_sync requires sound_end_time")
face_item["sound_end_time"] = int(sound_end)
if face_item["sound_end_time"] - face_item["sound_start_time"] < 2000:
raise ValueError("advanced_lip_sync requires at least 2000ms of cropped audio")
for key in ("sound_volume", "original_audio_volume"):
nested = face_item.get(key)
top_level = inputs.get(key)
if nested is not None and top_level is not None and float(nested) != float(top_level):
raise ValueError(
f"Conflicting {key} values between top-level input and face_choose[0]"
)
value = nested if nested is not None else top_level
if value is not None:View on GitHub (pinned to 95e1c3d0ab)
Solutions
- Delete the top-level sound_end_time and keep it only in face_choose[0] (per-face is more precise)
- Or align both values to the same number of milliseconds
- Grep your payload builder for double-injection of sound_end_time
Example fix
# before
inputs = {"sound_end_time": 6000, "face_choose": [{"face_id": "f1", "sound_end_time": 5000}]}
# after
inputs = {"face_choose": [{"face_id": "f1", "sound_end_time": 5000}]} Defensive patterns
Strategy: validation
Validate before calling
face_item = (inputs.get("face_choose") or [{}])[0]
for key in ("sound_end_time",):
nested, top = face_item.get(key), inputs.get(key)
if nested is not None and top is not None and int(nested) != int(top):
raise ValueError(f"conflicting {key}: pick one scope") Prevention
- Set sound_end_time only in face_choose for multi-face jobs
- Remove stale top-level timing fields when adding per-face overrides
- Validate both scopes for equality before calling
When it happens
Trigger: advanced_lip_sync with inputs['sound_end_time']=6000 and face_choose=[{'face_id': 'f1', 'sound_end_time': 5000}].
Common situations: Face-specific end times were tuned while an old top-level sound_end_time remained in the payload; defaults injected by a wrapper at the top level colliding with per-face values authored later.
Related errors
- Conflicting {key} values between top-level input and face_ch
- full_lip_sync could not infer sound_end_time; provide it exp
- advanced_lip_sync requires sound_end_time
- advanced_lip_sync requires at least 2000ms of cropped audio
- Conflicting audio input in face_choose[0]; provide audio_id
AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15).
Data as JSON: /api/errors/d5657d614ed54610.
Report an issue: GitHub.