KJNodes/hunyuanvideogenerated

Leapfusion Hunyuan I2V Patcher(LeapfusionHunyuanI2V)

This node achieves its functionality by 'patching' the incoming model.

Leapfusion Hunyuan I2 V

model
latent
MODEL
index
0
start_percent
0.00
end_percent
1.00
strength
1.000
KJNodes

The Leapfusion Hunyuan I2V Patcher node achieves its functionality by "patching" the incoming model.

The Leapfusion Hunyuan I2V Patcher is an advanced node for video generation and editing. Its core function is to modify the behavior of the diffusion model during the denoising process, allowing users to replace specific frames in a video sequence with a specified latent image, thereby achieving precise control over the generated video content.

Node Functionality

This node achieves its functionality by "patching" the incoming model. It intervenes during the model's denoising sampling steps. Based on the user-defined start percentage (start_percent) and end percentage (end_percent), at specific denoising stages, it replaces the latent representation of the target frame (specified by index) with the user-provided latent. The strength of this replacement can be adjusted via the strength parameter, which supports negative values for reverse guidance.

Node Parameter Description - Leapfusion Hunyuan I2V Patcher

Connection Inputs (Inputs)

Parameter NameData TypeRequiredDefault ValueRange/OptionsDescription
modelMODELYes--model (input parameter): Receives the original diffusion model that requires patching. This parameter defines the model foundation for subsequent operations.
latentLATENTYes--latent (input parameter): Provides the latent image representation used to replace a specific frame in the video. This data will be injected into the generation process according to other parameter settings.

Control Parameters (Parameters)

Parameter NameData TypeRequiredDefault ValueRange/OptionsDescription
indexINTYes0-1 - 1000 (step: 1)The index of the latent to be replaced. 0 for first frame and -1 for last
start_percentFLOATYes0.00.0 - 1.0 (step: 0.01)The start percentage of steps to apply
end_percentFLOATYes1.00.0 - 1.0 (step: 0.01)The end percentage of steps to apply
strengthFLOATYes1.0-10.0 - 10.0 (step: 0.001)strength (input parameter): Controls the intensity coefficient of the latent image replacement effect. Range is -10.0 to 10.0, with a step of 0.001. Positive values enhance replacement, negative values may produce reverse effects.

Output

Parameter NameData TypeDescription
MODELMODELMODEL (output parameter): Outputs the newly patched model, which already includes the replacement logic for the specific frame.

Usage Scenarios

You can use this node in image-to-video (I2V) or video interpolation workflows. For example, when you have generated a video sequence but wish to modify a specific frame (such as the first or last frame), you can load an independent latent image representation and use this node to "inject" it into the original video generation process. This changes the final appearance of that frame while maintaining the overall coherence of the video.

Notes

This node belongs to the experimental category. Its behavior may be highly dependent on the specific model architecture and sampler settings. When using it, pay attention to the valid range of the index parameter, and note that improper settings of the strength parameter may lead to unstable visuals.

The Leapfusion Hunyuan I2V Patcher node is from the ComfyUI-KJNodes node package.

Comments

Sign in with GitHub to join the discussion.

Loading comments…