KJNodes/experimentalgenerated

Latent Inpaint TTM(LatentInpaintTTM)

This node implements its functionality by adding a wrapper named `TTM_OuterSampleWrapper` to the model.

Latent Inpaint TTM

model
mask
MODEL
steps
7
KJNodes

The Latent Inpaint TTM node implements its functionality by adding a wrapper named TTM_OuterSampleWrapper to the model.

Latent Inpaint TTM is an experimental node for latent space image inpainting. Based on TTM (Time To Move) technology, it is specifically designed to redraw content in specific areas of an image during the generation process while keeping other areas unchanged.

Node Functionality

This node implements its functionality by adding a wrapper named TTM_OuterSampleWrapper to the model. Its core mechanism involves guiding the model based on the input mask (MASK) for a specified number of sampling steps, performing content inpainting on the masked area (white parts) in the latent space, while the areas outside the mask (black parts) remain in their original state. It directly manipulates the model's sampling process and belongs to an advanced model patching technique.

Node Parameter Description - Latent Inpaint TTM

Connection Inputs (Inputs)

Parameter NameData TypeRequiredDefault ValueRange/OptionsDescription
modelMODELYes--model (input parameter): The base model used for inpainting. The node will apply the inpainting logic based on this model.
maskMASKNo--mask (input parameter): Specifies the latent space mask for the area to be inpainted. White areas (value 1.0) will be inpainted, while black areas (value 0.0) will remain unchanged.

Control Parameters (Parameters)

Parameter NameData TypeRequiredDefault ValueRange/OptionsDescription
stepsINTYes70 - 888 (Step: 1)Number of steps to apply TTM inpainting for.

Output

Parameter NameData TypeDescription
MODELMODELMODEL (output parameter): Outputs the patched model with the inpainting functionality integrated.

Usage Scenarios

In an image inpainting workflow, you can connect this node after the base model. For example, first generate an initial image, then use a masking tool to mark the area that needs modification, and finally, use this node to guide the model to redraw only that area in subsequent sampling steps, thereby achieving local content replacement or flaw correction.

Notes

Please note that this node is marked as "experimental"; its stability and effectiveness may vary depending on different models and scenarios. It requires a valid mask input to function correctly, and the inpainting result is influenced by the specified number of steps.

The Latent Inpaint TTM node is from the ComfyUI-KJNodes node package.

Comments

Sign in with GitHub to join the discussion.

Loading comments…