Fix vace_context_scale not sent in initial params without ref images#630
Fix vace_context_scale not sent in initial params without ref images#630ryanontheinside merged 2 commits intomainfrom
Conversation
vace_context_scale was only included in initial stream parameters and
load params when reference images were present, because it was gated
inside getVaceParams() which returns {} without ref images. When using
VACE with input video (no ref images), the scale was never sent at
stream start, so the backend always defaulted to 1.0 regardless of
the UI slider value.
Decouple vace_context_scale from the ref-images check so it is always
sent when the pipeline supports VACE.
Signed-off-by: RyanOnTheInside <[email protected]>
📝 WalkthroughWalkthroughAlways send VACE context scale when a pipeline supports VACE (defaulting to 1.0) across frontend and backend; backend loading/configuration and tests updated to extract/apply Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/scope/server/pipeline_manager.py`:
- Around line 569-571: The Krea branch still builds VACE config inline instead
of using the shared _configure_vace(), so it never gets vace_context_scale;
modify the branch that handles the "krea-realtime-video" pipeline to call
_configure_vace(config, load_params, ...) (same helper used elsewhere) rather
than inlining VACE setup, and after that call set config["vace_path"] to the 14B
checkpoint identifier (override the helper’s default for this branch) so the
Krea pipeline uses the new VACE scale path with the 14B model.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 2fce2b1a-c9ee-4795-ac08-6638db61b7c6
📒 Files selected for processing (2)
frontend/src/pages/StreamPage.tsxsrc/scope/server/pipeline_manager.py
| # Always apply vace_context_scale when provided (applies to both | ||
| # ref-image and input-video VACE modes) | ||
| config["vace_context_scale"] = load_params.get("vace_context_scale", 1.0) |
There was a problem hiding this comment.
Krea still bypasses the new VACE scale path.
_configure_vace() now propagates vace_context_scale, but krea-realtime-video still configures VACE inline on Lines 929-938 and never copies that field into config. That leaves one VACE-capable built-in pipeline on the old behavior. Please route the Krea branch through this helper, then override vace_path to the 14B checkpoint there.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/scope/server/pipeline_manager.py` around lines 569 - 571, The Krea branch
still builds VACE config inline instead of using the shared _configure_vace(),
so it never gets vace_context_scale; modify the branch that handles the
"krea-realtime-video" pipeline to call _configure_vace(config, load_params, ...)
(same helper used elsewhere) rather than inlining VACE setup, and after that
call set config["vace_path"] to the 14B checkpoint identifier (override the
helper’s default for this branch) so the Krea pipeline uses the new VACE scale
path with the 14B model.
🚀 fal.ai Preview Deployment
TestingConnect to this preview deployment by running this on your branch: 🧪 E2E tests will run automatically against this deployment. |
✅ E2E Tests passed
Test ArtifactsCheck the workflow run for screenshots. |
leszko
left a comment
There was a problem hiding this comment.
Please check the comment from rabbitcode. Other than that LGTM
The Krea branch in _load_pipeline_implementation inlined its VACE setup to use the 14B checkpoint instead of the default 1.3B, but this skipped the vace_context_scale and ref_images extraction that _configure_vace provides. Add the missing parameter extraction and tests. Signed-off-by: RyanOnTheInside <[email protected]>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/test_pipeline_manager_vace.py (1)
147-151: Consider adding a test forload_params=Nonein the Krea branch.The current tests cover
vace_enabled=Falsebut not the case whereload_paramsitself isNone. Based on the Krea implementation, whenload_params=None:
vace_pathis set (14B checkpoint)vace_context_scaleis not set (the innerif load_params:block is skipped)This differs from passing
{}wherevace_context_scaledefaults to 1.0. If this behavior is intentional, a test documenting it would be valuable.📝 Optional: Add test for load_params=None
def test_no_load_params(self): """Krea branch with load_params=None should set vace_path but not vace_context_scale.""" config = self._load_krea_config(None) assert "14B" in config["vace_path"] assert "vace_context_scale" not in config🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/test_pipeline_manager_vace.py` around lines 147 - 151, Add a new unit test in tests/test_pipeline_manager_vace.py to cover the Krea branch when load_params is None: create a method (e.g., test_no_load_params) that calls the existing helper _load_krea_config(None), asserts that the returned config contains a vace_path (check that "14B" appears in config["vace_path"]) and asserts that "vace_context_scale" is not present in the config; this mirrors the behavior different from passing an empty dict and documents the intended behavior alongside test_vace_disabled.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@tests/test_pipeline_manager_vace.py`:
- Around line 147-151: Add a new unit test in
tests/test_pipeline_manager_vace.py to cover the Krea branch when load_params is
None: create a method (e.g., test_no_load_params) that calls the existing helper
_load_krea_config(None), asserts that the returned config contains a vace_path
(check that "14B" appears in config["vace_path"]) and asserts that
"vace_context_scale" is not present in the config; this mirrors the behavior
different from passing an empty dict and documents the intended behavior
alongside test_vace_disabled.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1878d84a-527d-4247-bb68-c18ef208b7a6
📒 Files selected for processing (2)
src/scope/server/pipeline_manager.pytests/test_pipeline_manager_vace.py
🚧 Files skipped from review as they are similar to previous changes (1)
- src/scope/server/pipeline_manager.py
Summary
vace_context_scalewas only included in initial stream parameters and load params when reference images were present, because it was gated insidegetVaceParams()which returns{}without ref imagesvace_context_scalefrom the ref-images check in both the frontend (initial params + load params) and backend (_configure_vace) so it is always sent when the pipeline supports VACETest plan
Summary by CodeRabbit