Model Matrix Lab
A/B test checkpoints without rebuilding the graph twenty times
- latent_image
- clip
- vae
- grid_image
Choosing between checkpoints is usually: swap the model, rerun, squint, repeat. ModelMatrixLab inverts that. You load up to 20 checkpoints or standalone diffusion models into one node, it keeps the prompt, seed, steps, CFG, sampler and scheduler locked across all of them, and returns one labeled grid so you can actually see which model earns the download. It's the sibling of the pack's KSamplerMatrixLab node, from the same ComfyUI-KSampler-Matrix-Lab repo, and it exists for the same reason the original does: comparisons are only trustworthy when nothing but the thing you're testing changes.
How it works
The model slots are populated from your local ComfyUI folders - every file in checkpoints and diffusion_models shows up, prefixed checkpoint | or diffusion | so you always know which kind you're picking. For each selected model the node loads it (CheckpointLoaderSimple for checkpoints, UNETLoader for standalone diffusion models), uses the model's embedded CLIP and VAE when it has them, encodes the same prompt through that CLIP, runs one shared sampler/scheduler, decodes, and then unloads the model - nulling the references, calling gc.collect() and soft_empty_cache() - before loading the next. That unload-between-models is the clever bit: it's what lets you walk a grid of big checkpoints without the VRAM piling up as you go.
A word on fairness: seed is a single shared value for every cell. That's the point. Same noise, same settings, different model - the grid you get back is a controlled experiment, not a vibe.
The inputs that matter
latent_image is the shared starting latent. positive_text and negative_text are plain multiline prompt boxes - the tooltip is blunt: the same prompt is encoded for every selected model. Then the shared generation settings: seed, steps, cfg, denoise, plus a single sampler_name and scheduler that apply to all models. You're comparing models, not re-rolling samplers.
The model_01–20 dropdowns are the grid itself; None skips a slot. diffusion_weight_dtype (default, fp8_e4m3fn, fp8_e4m3fn_fast, fp8_e5m2) only affects standalone diffusion models - if you're comparing raw UNETs and VRAM is tight, fp8 is your friend. grid_columns sets how many cells per row, and the usual layout knobs (cell_scale, font_size, padding, background, show_grid_lines, show_cell_labels, show_run_header, continue_on_error) are the same ones the sampler node uses. Output is a single grid_image IMAGE for Preview or Save.
The one thing that bites people
Checkpoints carry their own text encoder and VAE. Standalone diffusion models don't - a UNET is just the denoiser. So if you're comparing diffusion models, you must feed the optional clip and vae inputs, or the node raises "No compatible CLIP is available" (and separately "No compatible VAE"). The tooltips spell this out: the CLIP/VAE inputs are required for standalone diffusion models or checkpoints without an embedded one. This is the #1 reason a grid comes back full of red error cells, and it's not a bug - the node genuinely has nothing to encode the prompt with.
Installing it
Same pack, same one-liner:
cd ComfyUI/custom_nodes
git clone https://github.com/btitkin/ComfyUI-KSampler-Matrix-Lab.git
Or grab it through ComfyUI Manager (search "KSampler Matrix Lab"), then restart. There's no requirements.txt and nothing extra to download - it leans entirely on ComfyUI's built-in model loaders, so install is about as painless as a custom node gets. The node appears under the ComfyUI-KSampler-Matrix-Lab category.
Honest caveats
If your model_01 slot only shows "None", it just means your checkpoints folder is empty or the dropdown didn't refresh - the list is generated from your local install at node-creation time. And be realistic about runtime: every cell is a full generation, and this one also reloads a model per cell, so a 10-checkpoint grid on SDXL is a "go make tea" run, not a "quick test." It's the price of a genuinely controlled comparison. If you only need to eyeball two checkpoints occasionally, a manual swap is fine; this earns its keep when you're shortlisting models and want the whole lineup on one image.
Inputs (41)
| Name | Type | Default | Description |
|---|---|---|---|
| latent_image | LATENT | — | |
| positive_text | STRING | The same positive prompt is encoded for every selected model. | |
| negative_text | STRING | The same negative prompt is encoded for every selected model. | |
| seed | INT | 00–18446744073709550000 | — |
| steps | INT | 201–10000 | — |
| cfg | FLOAT | 8.00–100 | — |
| denoise | FLOAT | 1.000–1 | — |
| sampler_name | COMBO | The sampler used for every selected model. | |
| scheduler | COMBO | The scheduler used for every selected model. | |
| model_01 | COMBO | None | Select a checkpoint or standalone diffusion model, or None to ignore this slot. |
| model_02 | COMBO | None | Select a checkpoint or standalone diffusion model, or None to ignore this slot. |
| model_03 | COMBO | None | Select a checkpoint or standalone diffusion model, or None to ignore this slot. |
| model_04 | COMBO | None | Select a checkpoint or standalone diffusion model, or None to ignore this slot. |
| model_05 | COMBO | None | Select a checkpoint or standalone diffusion model, or None to ignore this slot. |
| model_06 | COMBO | None | Select a checkpoint or standalone diffusion model, or None to ignore this slot. |
| model_07 | COMBO | None | Select a checkpoint or standalone diffusion model, or None to ignore this slot. |
| model_08 | COMBO | None | Select a checkpoint or standalone diffusion model, or None to ignore this slot. |
| model_09 | COMBO | None | Select a checkpoint or standalone diffusion model, or None to ignore this slot. |
| model_10 | COMBO | None | Select a checkpoint or standalone diffusion model, or None to ignore this slot. |
| model_11 | COMBO | None | Select a checkpoint or standalone diffusion model, or None to ignore this slot. |
| model_12 | COMBO | None | Select a checkpoint or standalone diffusion model, or None to ignore this slot. |
| model_13 | COMBO | None | Select a checkpoint or standalone diffusion model, or None to ignore this slot. |
| model_14 | COMBO | None | Select a checkpoint or standalone diffusion model, or None to ignore this slot. |
| model_15 | COMBO | None | Select a checkpoint or standalone diffusion model, or None to ignore this slot. |
| model_16 | COMBO | None | Select a checkpoint or standalone diffusion model, or None to ignore this slot. |
| model_17 | COMBO | None | Select a checkpoint or standalone diffusion model, or None to ignore this slot. |
| model_18 | COMBO | None | Select a checkpoint or standalone diffusion model, or None to ignore this slot. |
| model_19 | COMBO | None | Select a checkpoint or standalone diffusion model, or None to ignore this slot. |
| model_20 | COMBO | None | Select a checkpoint or standalone diffusion model, or None to ignore this slot. |
| diffusion_weight_dtype | COMBO | default | Weight dtype used only for standalone diffusion models. |
| grid_columns | INT | 31–20 | — |
| cell_scale | FLOAT | 1.000.05–4 | — |
| font_size | INT | 228–96 | — |
| padding | INT | 100–96 | — |
| background | COMBO | white | 3 options: white, gray, black |
| show_grid_lines | BOOLEAN | true | — |
| show_cell_labels | BOOLEAN | true | Show the model source and filename above every grid cell. |
| show_run_header | BOOLEAN | true | Show sampler, scheduler, steps, CFG, and denoise above the grid. |
| continue_on_error | BOOLEAN | true | — |
| clipopt | CLIP | Required for standalone diffusion models or checkpoints without an embedded CLIP. | |
| vaeopt | VAE | Required for standalone diffusion models or checkpoints without an embedded VAE. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| grid_image | IMAGE | — |