Enable first frame processing only in VideoSegmentationSam3Text - #73
Open
demoulinv wants to merge 4 commits into
Open
Enable first frame processing only in VideoSegmentationSam3Text#73demoulinv wants to merge 4 commits into
demoulinv wants to merge 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds first-frame-only segmentation to the SAM3 text video node.
Changes:
- Adds
firstFrameOnlyand conditional parameter enablement. - Limits processing and propagation to the first frame.
- Bumps the module version to 2.2.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| track_states=track_states, | ||
| color_palette=color_palette, | ||
| combine_fwd_bwd=chunk.node.combineFwdAndBwdSeg.value | ||
| combine_fwd_bwd=chunk.node.combineFwdAndBwdSeg.value and not chunk.node.firstFrameOnly.value |
Comment on lines
+512
to
+515
| if node.firstFrameOnly.value: | ||
| self.image_paths = [image_paths[0]] | ||
| else: | ||
| self.image_paths = image_paths |
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.
This pull request updates the
VideoSegmentationSam3Textnode to add an option for processing only the first frame of a video, and ensures that related segmentation and propagation features are correctly disabled when this option is active. The changes improve the flexibility of the segmentation workflow and prevent conflicting parameter combinations.Key changes:
New Feature: First Frame Only Processing
firstFrameOnlyto allow segmentation to be run on only the first frame, without propagating to the rest of the sequence.Conditional Parameter Enablement
combineFwdAndBwdSeg,timeSlicing, andsliceSizeparameters to be disabled whenfirstFrameOnlyis enabled, preventing users from selecting incompatible options.outputColorMasksparameter, so it is only enabled iffirstFrameOnlyis not active.Processing Logic Adjustments
firstFrameOnlysetting, ensuring that time slicing and combined segmentation are not performed when only the first frame is processed.firstFrameOnlyis set.firstFrameOnlyis enabled.Version Update
2.1to2.2to reflect the new feature.