fix: suppress VaceEncodingBlock per-chunk crash storm for stale asset paths (#689)#691
Open
livepeer-tessa wants to merge 1 commit intomainfrom
Open
fix: suppress VaceEncodingBlock per-chunk crash storm for stale asset paths (#689)#691livepeer-tessa wants to merge 1 commit intomainfrom
livepeer-tessa wants to merge 1 commit intomainfrom
Conversation
… paths (#689) When a saved workflow references an image path that no longer exists on the current fal.ai worker (ephemeral workers don't persist /home/rio/.daydream-scope/assets/), VaceEncodingBlock was crashing on every processed chunk — producing 150+ identical ERROR lines in a single session (fal.ai job f01568f1-17dd-4ff7-97f5-ca0912140395, 2026-03-14). Fix: - Add _validate_image_paths() helper that checks os.path.exists() for every referenced image (vace_ref_images, first_frame_image, last_frame_image) before attempting to encode. - First missing path → logs ERROR with clear guidance to re-upload. - Subsequent calls for the same missing path → silent (no repeat storm). - Block returns early with vace_context=None, matching the existing 'no inputs provided' skip path. Adds 9 regression tests covering the log-once suppression behaviour, including a 150-chunk simulation that asserts exactly 1 ERROR is emitted. Related: #524 (Windows-style asset paths — same block, different cause) Related: #685, #673 (same per-chunk flood pattern, different root cause) Signed-off-by: livepeer-robot <robot@livepeer.org>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
Contributor
🚀 fal.ai Preview Deployment
TestingConnect to this preview deployment by running this on your branch: 🧪 E2E tests will run automatically against this deployment. |
Contributor
✅ E2E Tests passed
Test ArtifactsCheck the workflow run for screenshots. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #689.
When a saved workflow references an image path that no longer exists on the current fal.ai worker (ephemeral workers don't persist
/home/rio/.daydream-scope/assets/),VaceEncodingBlockwas crashing on every processed chunk, producing 150+ identical ERROR lines in a single session.Root cause:
Image.open(ref_path)inload_and_prepare_reference_imagesthrowsFileNotFoundErrorunconditionally. The pipeline processor catches the exception per-chunk and keeps running — so a single stale asset floods logs for the entire session.Changes
vace_encoding.py_logged_missing_assets: set[str]to__init__— tracks which missing paths have already been reported_validate_image_paths(paths)— checksos.path.exists()for every referenced image before encoding; logs ERROR once per unique missing path, then silently suppresses repeats__call__, call_validate_image_pathsbefore any encoding attempt; short-circuit withvace_context=Noneif any path is missing (same behaviour as the existing no-inputs skip path)tests/test_vace_encoding_block_missing_asset.py(new)9 tests covering:
__call__integration: skips encoding, setsvace_context=None, logs onceBehaviour after this fix
FileNotFoundError× N chunksRelated