Skip to content

feat: prompt_influence on video_to_music and video_to_video_music (0.12.0 / cli 0.10.0) - #27

Merged
spencer-zqian merged 1 commit into
mainfrom
feat/prompt-influence
Aug 6, 2026
Merged

feat: prompt_influence on video_to_music and video_to_video_music (0.12.0 / cli 0.10.0)#27
spencer-zqian merged 1 commit into
mainfrom
feat/prompt-influence

Conversation

@spencer-zqian

Copy link
Copy Markdown
Contributor

Summary

Propagates the API's new prompt_influence parameter to the Python SDK and CLI, mirroring how keep_original_sound was propagated in #23.

The parameter: an optional float, 0-1 inclusive, on /v1/video-to-music and /v1/video-to-video-music only. It sets how strongly the generated music follows the prompt (API default 0.5): lower values let the video lead; higher values follow the prompt more literally. Free of charge.

Omit-means-unchanged contract: the multipart field is only emitted when explicitly passed, guarded with is not None — never truthiness — so an explicit 0.0 ("let the video lead entirely") goes on the wire while unset leaves the field off entirely and the API's own 0.5 default (the long-standing behavior) applies. Range checking is left to the API's 422, matching the existing variants_num convention.

Not async-only: the API takes it on the video-to-music streaming path with no mode guard, so it lives in build_v2m_parts (keyword-only, None default — the shared-builder pattern used for output_format/keep_original_sound) and is exposed on stream()/generate() as well as submit()/generate_async(), sync and async clients alike. video_to_video_music forwards it through build_v2v_music_parts on submit()/generate(). No other endpoint exposes it — asserted on the public signatures.

CLI: --prompt-influence on video-to-music and video-to-video-music; on the former it rides the streaming default rather than forcing async.

Versions

  • sonilo 0.11.3 → 0.12.0
  • sonilo-cli 0.9.0 → 0.10.0, core pin widened >=0.11.0,<0.12>=0.12.0,<0.13 (the narrow pin would make the 0.12.0 core unresolvable otherwise)

Tests

Run exactly as CI does (pytest / pytest sonilo-video-kit / pytest sonilo-cli):

  • core: 247 passed (10 new in tests/test_prompt_influence.py: omitted-when-None, sent when set, sent when 0.0, async-parts forwarding, signature presence/absence)
  • sonilo-video-kit: 53 passed
  • sonilo-cli: 93 passed (5 new: streaming-path body, 0 → 0.0, omitted when unset, v2v-music body, v2v-music omitted)

🤖 Generated with Claude Code

…12.0 / cli 0.10.0)

Adds the API's new prompt_influence multipart field: a 0-1 float setting how
strongly the generated music follows the prompt (lower lets the video lead,
higher follows the prompt more literally). Free of charge; the API's own
default is 0.5.

Omitted-means-unchanged: the field is only sent when explicitly passed, with
an `is not None` check so an explicit 0.0 ("let the video lead entirely")
does go on the wire. Range checking is left to the API's 422, same as
variants_num.

Unlike the finalize-time options it is NOT async-only — the API takes it on
the video-to-music streaming path with no mode guard — so it lives in
build_v2m_parts (keyword-only, None default, per the shared-builder pattern)
and is exposed on stream()/generate() as well as submit()/generate_async().
video_to_video_music forwards it through build_v2v_music_parts. No other
endpoint accepts it, asserted on the public signatures.

sonilo-cli gains --prompt-influence on video-to-music and
video-to-video-music, and its core pin widens from >=0.11.0,<0.12 to
>=0.12.0,<0.13 to make the 0.12.0 core resolvable. Core sonilo
0.11.3 -> 0.12.0, sonilo-cli 0.9.0 -> 0.10.0. READMEs document the knob.
@sapient-app

sapient-app Bot commented Aug 6, 2026

Copy link
Copy Markdown

Sapient docs evals

Waiting for the staging docs URL before running evals.

Sapient will start the selected PR evals automatically when GitHub reports a successful docs deployment for this PR. This usually happens within 15 minutes.

Commit: 2214036
Status: waiting for staging docs URL

@spencer-zqian
spencer-zqian merged commit bcb0be5 into main Aug 6, 2026
2 checks passed
@spencer-zqian
spencer-zqian deleted the feat/prompt-influence branch August 6, 2026 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant