Sampler SelfRefineVideo(SamplerSelfRefineVideo)
Its core functionality allows you to plan a 'random refinement' schedule, specifying at which step intervals additional processing should be performed during the sampling process.
Sampler Self Refine Video
The Sampler SelfRefineVideo node is an attempt to implement https://github.com/agwmon/self-refine-video. For testing only – MAY NOT WORK AS INTENDED. This sampler is designed to enhance video quality by iteratively refining uncertain pixels during the sampling process.
Use Cases
Use the Sampler SelfRefineVideo node when you want to reduce flickering and frame jumps in generated videos during action transitions or complex scenes. For example, when creating animations with rapidly moving characters, adjusting the uncertainty threshold and certainty percentage can help stabilize motion. It is also well-suited for scenes requiring high detail, such as facial close-ups or objects with complex textures, by allowing the sampler to focus refinement on uncertain regions.
Inputs
| Name | Type | Required | Default | Tooltip / Notes |
|---|---|---|---|---|
input_mode | DYNAMICCOMBO | Yes | - | How to configure the step plan. The available options are determined dynamically. |
certain_percentage | FLOAT | Yes | 0.999 | Percentage of certain pixels to consider the frame as certain and skip further refinement. Range [0,1], step 0.001. |
uncertainty_threshold | FLOAT | Yes | 0.2 | Threshold of uncertainty to consider a pixel uncertain. Range [0,1], step 0.01. |
verbose | BOOLEAN | Yes | False | Enable verbose logging during sampling. |
latent | LATENT | No | - | Optional latent input to get the input shape for LTX2 audio/video separation. |
seed | INT | Yes | 0 | Seed for stochastic sampling. Range [0, 2^64). |
Outputs
| Type | Description |
|---|---|
| SAMPLER | A sampler object configured for self-refinement. |
Notes
- Increasing refinement (by lowering
certain_percentageor raisinguncertainty_threshold) will significantly increase computation time and resource usage. It is recommended to start testing with default settings and then gradually adjust based on output quality. - The
input_modecontrols how the refinement plan is generated. Consult the dynamic options (e.g., "auto") for the available strategies. - The
latentinput is optional and only needed if your pipeline uses LTX2-style audio/video separation; otherwise it can be left disconnected. - This implementation is experimental. Behavior may change or be incomplete compared to the upstream reference.
Sampler SelfRefineVideo Node Source Code Link
The Sampler SelfRefineVideo node is from the ComfyUI-KJNodes node package.
Comments
Sign in with GitHub to join the discussion.