ComfyUI > Nodes > LanPaint > LanPaint KSampler (Advanced)

ComfyUI Node: LanPaint KSampler (Advanced)

Class Name

LanPaint_KSamplerAdvanced

Category
sampling
Author
scraed (Account age: 4120days)
Extension
LanPaint
Latest Updated
2026-04-11
Github Stars
1.1K

How to Install LanPaint

Install this extension via the ComfyUI Manager by searching for LanPaint
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter LanPaint in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

LanPaint KSampler (Advanced) Description

LanPaint_KSamplerAdvanced enhances latent image denoising using advanced sampling techniques.

LanPaint KSampler (Advanced):

LanPaint_KSamplerAdvanced is an advanced node designed to enhance the sampling process within the LanPaint framework, which is part of the ComfyUI ecosystem. This node is tailored for AI artists who wish to leverage sophisticated sampling techniques to achieve high-quality denoising of latent images. The primary goal of LanPaint_KSamplerAdvanced is to utilize a model's positive and negative conditioning to effectively denoise latent images, thereby improving the clarity and quality of the generated outputs. It offers a range of customizable parameters that allow users to fine-tune the sampling process according to their specific artistic needs. By integrating advanced sampling strategies, this node provides users with the flexibility to experiment with different configurations, ultimately leading to more refined and visually appealing results.

LanPaint KSampler (Advanced) Input Parameters:

model

The model parameter refers to the AI model used for the sampling process. It is crucial as it determines the underlying architecture and capabilities that will be applied to the latent image. The model should be compatible with the LanPaint framework to ensure optimal performance.

seed

The seed parameter is used to initialize the random number generator, which affects the reproducibility of the sampling process. By setting a specific seed value, you can ensure that the same input will produce the same output, which is useful for consistency in experiments. There is no strict minimum or maximum value, but it is typically a positive integer.

steps

This parameter defines the number of steps the sampling process will take. More steps generally lead to better quality results, as the model has more opportunities to refine the image. However, increasing the number of steps also increases the computational cost. The minimum value is usually 1, with no strict maximum, but practical limits depend on available computational resources.

cfg

The cfg parameter, or configuration scale, controls the strength of the conditioning applied during sampling. A higher cfg value means stronger adherence to the conditioning prompts, which can lead to more precise outputs but may also reduce creativity. The default value is often set around 7.0, with typical ranges from 1.0 to 20.0.

sampler_name

This parameter specifies the name of the sampler to be used. Different samplers can have varying effects on the output, and choosing the right one can significantly impact the quality and style of the generated image. Common options include "ddim" and "plms".

scheduler

The scheduler parameter determines the scheduling strategy for the sampling process. It affects how the steps are distributed over time, which can influence the convergence and quality of the results. Options may include "linear" or "cosine".

positive

Positive conditioning refers to the prompts or features that the model should emphasize during the sampling process. This parameter guides the model towards desired characteristics in the output image.

negative

Negative conditioning is the opposite of positive conditioning, specifying features or prompts that the model should avoid. It helps in steering the output away from unwanted characteristics.

latent_image

The latent_image parameter is the initial latent representation of the image that will be denoised. It serves as the starting point for the sampling process, and its quality can significantly affect the final output.

denoise

This parameter controls the amount of denoising applied to the latent image. A value of 1.0 means full denoising, while lower values retain more of the original noise, which can be useful for artistic effects. The default is typically 1.0.

LanPaint_NumSteps

LanPaint_NumSteps specifies the number of internal steps used by the LanPaint method. It allows for fine-tuning the granularity of the sampling process, with higher values potentially leading to more detailed results.

LanPaint_PromptMode

This parameter determines the order of prompt processing, with options like "Image First" indicating that image-related prompts are prioritized. This can affect how the model interprets and applies conditioning.

LanPaint_Info

LanPaint_Info is an optional parameter for providing additional information or metadata that might be used during the sampling process. It can be useful for debugging or logging purposes.

Inpainting_mode

Inpainting_mode specifies the mode of inpainting to be used, such as "🖼️ Image Inpainting" or "🎬 Video Inpainting". This affects how the model handles missing or corrupted parts of the image, with different modes optimized for different types of content.

LanPaint KSampler (Advanced) Output Parameters:

The denoised latent

The output of the LanPaint_KSamplerAdvanced node is the denoised latent image. This is the refined version of the input latent image, with noise reduced according to the specified parameters. The quality of this output is crucial for achieving visually appealing results, as it represents the final stage of the sampling process. The denoised latent image can be further processed or directly used as the final output in your AI art projects.

LanPaint KSampler (Advanced) Usage Tips:

  • Experiment with different seed values to explore a variety of outputs from the same input conditions, which can lead to unexpected and creative results.
  • Adjust the cfg parameter to balance between adherence to prompts and creative freedom, depending on whether you want precise or more abstract outputs.
  • Use a higher number of steps for more detailed and refined images, especially when working with complex or high-resolution inputs.
  • Choose the appropriate inpainting mode based on the content type, such as using "🎬 Video Inpainting" for dynamic scenes or animations.

LanPaint KSampler (Advanced) Common Errors and Solutions:

Model compatibility error

  • Explanation: This error occurs when the selected model is not compatible with the LanPaint framework.
  • Solution: Ensure that you are using a model that is specifically designed or adapted for use with LanPaint. Check the model documentation for compatibility information.

Invalid seed value

  • Explanation: The seed value provided is not a valid integer, which is required for initializing the random number generator.
  • Solution: Verify that the seed value is a positive integer and try again. Avoid using non-numeric characters or negative values.

Insufficient steps

  • Explanation: The number of steps specified is too low to produce a meaningful output.
  • Solution: Increase the number of steps to allow the model more opportunities to refine the image. A minimum of 10 steps is recommended for basic quality.

Unsupported sampler name

  • Explanation: The sampler name provided does not match any of the supported options.
  • Solution: Check the available sampler options and ensure that you are using a valid name, such as "ddim" or "plms".

LanPaint KSampler (Advanced) Related Nodes

Go back to the extension to check out more related nodes.
LanPaint
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.