explaingit

btitkin/comfyui-ksampler-matrix-lab

25PythonAudience · designerComplexity · 2/5LicenseSetup · easy

TLDR

A ComfyUI add-on that runs every combination of up to nine AI image samplers and nine schedulers and assembles all the results into one labeled grid image so you can compare them side by side.

Mindmap

mindmap
  root((ksampler matrix lab))
    What It Does
      Multi-sampler comparison
      Single labeled grid output
      Automated batch runs
    Grid Settings
      Up to 9 samplers
      Up to 9 schedulers
      Fixed or varied seeds
    Header Options
      Model name
      CFG scale
      Step count
      Denoise strength
    Setup
      Clone into custom nodes
      Restart ComfyUI
    Use Cases
      Find best sampler
      Algorithm comparison
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Find the best sampler and scheduler combination for your AI image workflow without running dozens of separate tests manually.

USE CASE 2

Generate a single labeled grid image showing every sampler and scheduler pairing at a glance.

USE CASE 3

Lock in the same random seed across all grid cells to isolate algorithm differences from random variation.

USE CASE 4

Add an optional header row showing model name, CFG scale, steps, and denoise strength for easy reference.

Tech stack

PythonComfyUI

Getting it running

Difficulty · easy Time to first run · 5min

Requires an existing ComfyUI installation, clone the repo into the custom_nodes folder and restart ComfyUI to activate the node.

Use, modify, and share freely for any purpose including commercial projects, as long as you keep the copyright notice.

In plain English

ComfyUI KSampler Matrix Lab is a custom add-on for ComfyUI, a visual tool people use to generate images with AI models. The add-on adds a single node you can drop into your workflow that runs multiple sampler and scheduler combinations back to back and then assembles all the results into one labeled grid image. The problem it solves is comparison. When generating AI images, two key settings are the sampler (the algorithm that iteratively refines the image) and the scheduler (which controls how the noise is reduced across those steps). Different combinations produce different results, and figuring out which combination you prefer used to mean running each one separately and keeping track of which was which. This node automates that: you pick up to nine samplers and up to nine schedulers, it runs every pairing using the same model and the same settings, and returns a single image where columns are schedulers and rows are samplers. Each cell in the grid is labeled with the sampler and scheduler it used. An optional header at the top shows the model name, VAE, CLIP, number of steps, CFG scale, and denoise strength. You can also choose between two seed modes: one that uses the same random seed for every cell so the comparison is purely about the algorithm, and one that increments the seed per cell to see variation across results. Installation is done by cloning the repository into ComfyUI's custom_nodes folder and restarting the application. The node then appears in the node menu and connects to the same inputs as a standard generation workflow: model, conditioning, latent image, and VAE. There is an error-handling option that lets the grid continue generating even if one combination fails, inserting a placeholder cell instead of stopping everything. The project is released under the MIT license.

Copy-paste prompts

Prompt 1
Set up comfyui-ksampler-matrix-lab in ComfyUI and connect it to my existing image generation workflow to compare DPM++ 2M, Euler, and DDIM samplers.
Prompt 2
Run a KSampler Matrix Lab comparison of three samplers against three schedulers using a fixed seed so the results only differ by algorithm.
Prompt 3
Create a comparison grid with the model name and CFG scale shown in the header and explain what each labeled cell in the output means.
Prompt 4
Configure the KSampler Matrix Lab node to continue generating the grid even if one sampler-scheduler combination fails, and show me what the placeholder cell looks like.
Prompt 5
Help me read a KSampler Matrix Lab output grid and identify which sampler and scheduler combination produced the sharpest result.
Open on GitHub → Explain another repo

← btitkin on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.