Comfy-Org / Comfy-Org/ComfyUI

Combo widget filter (control_after_generate) does not filter values on randomize, neither as plain substring nor as /regex/

Open
#15,198 0 comments 0 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Custom Node Testing

- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)

### Expected Behavior

When a filter value is set on a Primitive node's combo widget (e.g. `ckpt_name`), the "randomize" control_after_generate mode should only select values from the combo list that match the filter, whether typed as a plain substring (`ghost`) or as a regex pattern (`/ghost/`)

### Actual Behavior

The filter is ignored. After queuing the prompt / triggering randomize, the Primitive node selects a value from the full unfiltered combo list, including files that do not contain "ghost" in their name. Tested with both `ghost` and `/ghost/` as the filter value, same result in both cases.

Image

Image

### Steps to Reproduce

1. Add a CheckpointLoaderSimple node
2. Right-click the ckpt_name widget → Convert to Input
3. Add a Primitive node and connect it to the ckpt_name input
4. Set the Primitive's control_after_generate to "randomize"
5. Set the filter
6. Queue the prompt / trigger randomize multiple times
7. Observe the selected checkpoint does not respect the filter
8. Tested with --disable-all-custom-nodes to rule out custom node interference — issue persists

### Debug Logs

```powershell
[INFO] Adding extra search path checkpoints /home/rafaelfg/Documents/stable/ComfyUI/models/checkpoints
[INFO] Adding extra search path clip /home/rafaelfg/Documents/stable/ComfyUI/models/clip
[INFO] Adding extra search path clip_vision /home/rafaelfg/Documents/stable/ComfyUI/models/clip_vision
[INFO] Adding extra search path configs /home/rafaelfg/Documents/stable/ComfyUI/models/configs
[INFO] Adding extra search path controlnet /home/rafaelfg/Documents/stable/ComfyUI/models/controlnet
[INFO] Adding extra search path diffusion_models /home/rafaelfg/Documents/stable/ComfyUI/models/diffusion_models
[INFO] Adding extra search path diffusion_models /home/rafaelfg/Documents/stable/ComfyUI/models/unet
[INFO] Adding extra search path embeddings /home/rafaelfg/Documents/stable/ComfyUI/models/embeddings
[INFO] Adding extra search path loras /home/rafaelfg/Documents/stable/ComfyUI/models/loras
[INFO] Adding extra search path upscale_models /home/rafaelfg/Documents/stable/ComfyUI/models/upscale_models
[INFO] Adding extra search path vae /home/rafaelfg/Documents/stable/ComfyUI/models/vae
[WARNING] WARNING: You need pytorch with cu130 or higher to use optimized CUDA operations.
[INFO] Found comfy_kitchen backend cuda: {'available': True, 'disabled': True, 'unavailable_reason': None, 'capabilities': ['adaln', 'apply_rope', 'apply_rope1', 'apply_rope_split_half', 'apply_rope_split_half1', 'convrot_w4a4_linear', 'dequantize_convrot_w4a4_weight', 'dequantize_int8_convrot_weight', 'dequantize_int8_convrot_weight_dtype', 'dequantize_int8_simple', 'dequantize_int8_simple_dtype', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'gemv_awq_w4a16', 'int8_linear', 'prepare_int4_weight_for_int8_linear', 'quantize_and_rotate_rowwise', 'quantize_convrot_w4a4_weight', 'quantize_int8_convrot_weight', 'quantize_int8_rowwise', 'quantize_int8_tensorwise', 'quantize_mxfp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8', 'quantize_svdquant_w4a4', 'rms_rope', 'rms_rope1', 'rms_rope_split_half', 'rms_rope_split_half1', 'scaled_mm_nvfp4', 'scaled_mm_svdquant_w4a4', 'stochastic_rounding_fp8']}
[INFO] Found comfy_kitchen backend eager: {'available': True, 'disabled': False, 'unavailable_reason': None, 'capabilities': ['adaln', 'apply_rope', 'apply_rope1', 'apply_rope_split_half', 'apply_rope_split_half1', 'convrot_w4a4_linear', 'dequantize_convrot_w4a4_weight', 'dequantize_int8_convrot_weight', 'dequantize_int8_convrot_weight_dtype', 'dequantize_int8_simple', 'dequantize_int8_simple_dtype', 'dequantize_mxfp8', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'gemv_awq_w4a16', 'int8_linear', 'prepare_int4_weight_for_int8_linear', 'quantize_and_rotate_rowwise', 'quantize_convrot_w4a4_weight', 'quantize_int8_convrot_weight', 'quantize_int8_rowwise', 'quantize_int8_tensorwise', 'quantize_mxfp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8', 'quantize_svdquant_w4a4', 'rms_rope', 'rms_rope1', 'rms_rope_split_half', 'rms_rope_split_half1', 'scaled_mm_mxfp8', 'scaled_mm_nvfp4', 'scaled_mm_svdquant_w4a4', 'stochastic_rounding_fp8']}
[INFO] Found comfy_kitchen backend triton: {'available': True, 'disabled': True, 'unavailable_reason': None, 'capabilities': ['adaln', 'apply_rope', 'apply_rope1', 'apply_rope_split_half', 'apply_rope_split_half1', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'int8_linear', 'quantize_and_rotate_rowwise', 'quantize_int8_rowwise', 'quantize_mxfp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8']}
[INFO] Checkpoint files will always be loaded safely.
[INFO] Total VRAM 24107 MB, total RAM 64205 MB
[INFO] pytorch version: 2.9.1+cu128
[INFO] xformers version: 0.0.33.post2
[INFO] Set vram state to: NORMAL_VRAM
[INFO] Device: cuda:0 NVIDIA GeForce RTX 4090 : cudaMallocAsync
[INFO] Using async weight offloading with 2 streams
[INFO] Enabled pinned memory 57784.0
[INFO] working around nvidia conv3d memory bug.
[INFO] Using xformers attention
aimdo: /project/src-posix/cuda-funchooks.c:52:DEBUG:aimdo_setup_hooks: hooks successfully installed
aimdo: /project/src/control.c:247:INFO:comfy-aimdo inited for GPU: NVIDIA GeForce RTX 4090 (VRAM: 24106 MB)
[INFO] DynamicVRAM support detected and enabled
[INFO] Python version: 3.12.13 (main, Mar 6 2026, 11:39:28) [GCC 15.2.1 20260209]
[INFO] ComfyUI version: 0.29.2
[INFO] comfy-aimdo version: 0.4.10
[INFO] comfy-kitchen version: 0.2.22
[INFO] Initializing frontend: Comfy-Org/ComfyUI_frontend@1.49.3, requesting version details from GitHub...
[INFO] [Prompt Server] web root: /home/rafaelfg/Documents/stable/ComfyUI/web_custom_versions/Comfy-Org_ComfyUI_frontend/1.49.3
[INFO] Asset seeder disabled
[INFO] No OpenGL_accelerate module loaded: Acceleration disabled
[INFO] Skipping loading of custom nodes
[INFO] Context impl SQLiteImpl.
[INFO] Will assume non-transactional DDL.
[INFO] Using RAM pressure cache.
[INFO] Starting server

[INFO] To see the GUI go to: http://127.0.0.1:8188
```

### Other

_No response_

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Start at the Primitive node's combo widget and its control_after_generate randomize path, reproduce with a filtered ckpt_name list using both `ghost` and `/ghost/`, and trace where the filter is applied. Done means repeated randomization selects only values matching the filter, with custom nodes disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.