ComfyUI > Nodes > LanPaint > LanPaint KSampler

ComfyUI Node: LanPaint KSampler

Class Name

LanPaint_KSampler

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 Description

LanPaint_KSampler enhances image generation by denoising latent images with advanced sampling.

LanPaint KSampler:

LanPaint_KSampler is a specialized node designed to enhance the image generation process by leveraging advanced sampling techniques. It extends the capabilities of ComfyUI's KSAMPLER, specifically tailored for the LanPaint framework. The primary purpose of this node is to facilitate the denoising of latent images using a model, positive and negative conditioning, and a series of customizable parameters. This node is particularly beneficial for AI artists looking to achieve high-quality image outputs by fine-tuning the sampling process. By integrating features such as early stopping, friction, and step size adjustments, LanPaint_KSampler provides a robust and flexible tool for generating visually appealing images with precision and control.

LanPaint KSampler 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. This parameter does not have a specific range of values as it depends on the models available in your environment.

seed

The seed parameter is used to initialize the random number generator, ensuring reproducibility of results. By setting a specific seed value, you can generate the same output consistently. This parameter typically accepts integer values, with no strict minimum or maximum, but it is often set within a practical range for consistency.

steps

Steps define the number of iterations the sampling process will undergo. More steps generally lead to finer details and higher quality images, but also increase computation time. The minimum value is 1, and there is no strict maximum, though it is often limited by computational resources.

cfg

CFG, or Classifier-Free Guidance, is a parameter that influences the strength of the guidance applied during sampling. It affects how closely the generated image adheres to the conditioning inputs. The value typically ranges from 0 to a higher positive number, with higher values leading to stronger guidance.

sampler_name

This parameter specifies the name of the sampler to be used. Different samplers can produce varying results, and this choice can impact the style and quality of the output. The options depend on the samplers available in your environment.

scheduler

The scheduler parameter determines the schedule of the sampling process, affecting how noise is reduced over iterations. It plays a role in the convergence and quality of the final image. The options for this parameter depend on the available schedulers in your setup.

positive

Positive conditioning refers to the input that guides the model towards desired features in the output image. It is a crucial parameter for shaping the final result according to specific artistic goals.

negative

Negative conditioning is the input that guides the model away from undesired features. It helps in refining the output by suppressing unwanted elements, complementing the positive conditioning.

latent_image

Latent image is the initial input image in its latent space form. It serves as the starting point for the denoising process, and its quality can significantly impact the final output.

denoise

The denoise parameter controls the extent of noise reduction applied during sampling. A value of 1.0 applies full denoising, while lower values retain more of the original noise, affecting the texture and detail of the output.

LanPaint_NumSteps

This parameter specifies the number of steps specific to the LanPaint process, allowing for additional control over the sampling iterations. It typically ranges from a few to several dozen steps, depending on the desired level of detail.

LanPaint_PromptMode

LanPaint_PromptMode determines the order of processing for image and text prompts. Options like "Image First" prioritize image processing, affecting how the model interprets and integrates inputs.

LanPaint_Info

LanPaint_Info is an optional parameter for providing additional information or metadata related to the sampling process. It does not directly affect the output but can be useful for documentation or debugging.

Inpainting_mode

Inpainting_mode specifies whether the process involves inpainting, which is the technique of filling in missing parts of an image. Options include "🖼️ Image Inpainting" and "🎬 Video Inpainting," affecting how the model handles incomplete inputs.

LanPaint KSampler Output Parameters:

The denoised latent

The denoised latent is the primary output of the LanPaint_KSampler node. It represents the processed latent image after the denoising and sampling steps have been applied. This output is crucial as it forms the basis for generating the final image, reflecting the influence of the model, conditioning inputs, and sampling parameters. The quality and characteristics of the denoised latent directly impact the visual appeal and fidelity of the resulting image.

LanPaint KSampler Usage Tips:

  • Experiment with different seed values to explore a variety of outputs while maintaining reproducibility for specific settings.
  • Adjust the steps parameter to balance between image quality and computational efficiency, increasing steps for more detailed outputs.
  • Utilize the CFG parameter to fine-tune the adherence to conditioning inputs, with higher values for stronger guidance.
  • Choose the appropriate sampler and scheduler to match your artistic goals, as different combinations can yield distinct styles and qualities.

LanPaint KSampler Common Errors and Solutions:

Error: Model not found

  • Explanation: This error occurs when the specified model is not available in your environment.
  • Solution: Ensure that the model is correctly installed and accessible, and verify the model parameter is set to the correct model name.

Error: Invalid seed value

  • Explanation: The seed parameter is not set to a valid integer.
  • Solution: Check that the seed value is an integer and within a practical range for your setup.

Error: Steps parameter out of range

  • Explanation: The steps parameter is set to a value that is too low or too high for the available computational resources.
  • Solution: Adjust the steps value to a reasonable range, considering your hardware capabilities and desired output quality.

LanPaint KSampler 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.