14 KiB
99% of this project's near 10k lines of code was written by either Gemini or Claude. Sorry if that upsets you, I've been a programmer for 15 years and it's simply a much faster means of developing.
With that said, here is a guide on:
Easyily Get AI To Add Features To This Project:
Gemini Pro & Claude Sonnet 4.5 both work great but they sometimes make mistakes. The key is to really get a very clear prompt built out.
Step 1. Send the AI the ProjectStructure.md and README.md files and your task and ask it to tell you which files need to be edited to get your task completed.
Step 2. Start a new chat and attach the files it mentioned, along with the following prompt or something similar with your task request prompt in the middle:
Prompt Fill-in:
Help me update my ComfyUI Custom Node. When updating files, DO NOT REMOVE ANY CODE. DO NOT REMOVE ANY COMMENTS. ONLY CHANGE WHAT IS NECESSARY.
PUT YOUR TASK HERE
Check ProjectStructure.md to get an idea of file structure and contents, check README.md to get an idea of the project as a whole.
step 3 ?????
step 4 Profit!!!
But seriously, after updating your code see if it works. If it didn't send the error message if there isnt one or your symptoms. If its still not working try a different AI or try breaking down your task in smaller pieces.
Check Roadmap.md for some tasks and do them. don't do any marked as (low priority). If you think you can do the ones marked as New to-do items, needs more info/explaining/numbering those are good. There is some info on the project in README.md and info on the file structure and notes on each files functions in the ProjectStructure.md
ComfyUI Ultimate Sampler Grid – Development Roadmap
New to-do items, needs more info/explaining/numbering
Easy Feature: Add Esc key close to Revise modal and add X to close in top right of modal in Dashboard and the Lookup LoRA Metadata from CivitAI, and omit lora triggerwords modals in the Builder UI. COMPLETED
Bug Fix: Batch Encoding Runs Before Job Skip/Continue/Resume check and will encode everything again even if it's already been completed. Also Continue/Resume Should NOT run by default if optional inputs are connected because changes to the optional inputs are not currently being tracked. We need to track connected node changes from each of the optional inputs, we could also use this step to save the workflow to the benchmark/session folder and compare the last run workflow to the current to track node changes and determine changes and also integrate currenly missing from optional inputs such as model, loras, prompts, etc.
Fix: Manifest doesn't need lora omit triggers list in every item (DONE - already stripped in create_image_metadata via .pop())
Add attention options, xformers, sdpa, sage, flash, etc, option for test all, test all should clear ram & vram between each test. COMPLETED
- Status: Added
attention_modeconfig field supporting: default, xformers, pytorch, flash, sage, sage3, sub_quad, split. Use"*"to test all modes. Runtime switching viatransformer_options["optimized_attention_override"]in ComfyUI's attention registry. Config Builder UI has dropdown+chips selector. Per-image metadata tracks which attention mode was used for dashboard filtering. Integrated into config expansion (Cartesian product with other params), skip/resume matching, and generation pipeline.
Deeper explained items to-do list
1. Skip Logic for Optional Inputs COMPLETED
- Problem: The
SamplerGridTesternode cannot reliably detect changes in optional inputs (optional_model,optional_vae, etc.) because standardIS_CHANGEDlogic relies on input hash comparisons, which don't update for passed objects in optional slots. - Status: Implemented
IS_CHANGEDclassmethod insampler_node.pythat returnsfloat("NaN")when any optional input is connected (forces re-execution), or a deterministic hash when no optional inputs are used (allows caching). Updatedcheck_if_job_completedingeneration_orchestrator.pyto skip model/lora/prompt matching when optional inputs are connected, since those values come from upstream nodes whose changes can't be tracked. Added warning when resume mode is used with optional inputs. - Target Files:
sampler_node.py,generation_orchestrator.py
7. CivitAI Download Integration (low priority)
- Problem: Can fetch info but not download files.
- Instruction:
- Backend: In
__init__.py, add route@routes.post("/configbuilder/download_lora"). - Logic: In
lora_utils.py, write adownload_file(url, filename)function usingrequests. Ensure it saves tofolder_paths.get_full_path("loras"). - Frontend: In
web/config_builder.js, add a "Download" button next to the CivitAI info result. Call the new API endpoint.
- Target Files:
__init__.py,lora_utils.py,web/config_builder.js
9. Tag/Token-Based Omit Logic COMPLETED
- Problem: Current logic (
if word in tag) is too broad or too strict. - Instruction:
- Modify
trigger_words.py: Updateget_filtered_lora_triggers. - Regex: Instead of
if omit in tag, usere.search(r'\b' + re.escape(omit) + r'\b', tag, re.IGNORECASE). This ensures "blue" removes "blue" but not "blueberry". - Tokenization: Split the tag into words, filter against the omit set, and rejoin.
- Status: Already implemented in
_should_omit_trigger()function with regex word boundary matching. - Target Files:
trigger_words.py
10. Validation Warning (Omit vs Lookup) - Warn user if omits are added but lookup is off (low priority)
- Problem: User adds omit words but forgets to enable "Lookup & Append".
- Instruction:
- Modify
web/config_builder.js: inside therender()loop. - Logic:
if (this.state.lora_omit_triggers.length > 0 && !this.state.lookup_triggers). - UI: Render a warning alert div: "⚠️ Omit list is active, but Trigger Lookup is disabled. Omits will have no effect."
- Target Files:
web/config_builder.js
11. Model-Specific Prompts COMPLETED
- Problem: Different models need different trigger words (e.g., "score_9, score_8" for Pony vs "masterpiece" for SD1.5).
- Status: Implemented as per-config
model_prompt_prefixandmodel_prompt_suffixfields. These quality tags are prepended/appended to ALL prompts for a given config, wrapping around the entire prompt+triggers assembly. Added_apply_model_prompt_affixes()helper intrigger_words.py, integrated into bothbuild_prompt_with_triggers()andcollect_unique_prompts_with_triggers()for correct pre-encoding. Config Builder UI shows prefix/suffix text inputs in the Prompts section of each config. Fields persist through save/load and are passed throughexpand_configs()inconfig_utils.py. - Target Files:
trigger_words.py,config_utils.py,conf-builder-config-management.js,conf-builder-utilities.js,conf-builder-main.js
12. Arrays in LoRA Weights COMPLETED
- Problem: Cannot grid search LoRA weights like
lora.safetensors:[0.5, 0.8]:1.0. - Status: Implemented
_expand_lora_weight_arrays()inconfig_utils.py. Supports[0.5, 0.8]syntax in both model_strength and clip_strength positions, with Cartesian product for multiple arrays. - Target Files:
config_utils.py
13. Real-Time ETA COMPLETED
- Problem: ETA only prints to server console.
- Status: Implemented real-time progress bar in Dashboard. Backend sends
ultimate_grid.progressevents via WebSocket after each job. Frontend displays an ETA bar below the header with job count, percentage, ETA, finish time, and avg duration. Shows completion summary and auto-hides after 30s. - Target Files:
generation_orchestrator.py,web/dashboard.js,resources/logic_events.js,resources/template.html
14. Cache Trigger Word Placement (low priority)
- Problem:
trigger_words.pylogic runs every loop iteration. - Instruction:
- Modify
trigger_words.py: - Apply: Decorate
get_filtered_lora_triggers
- Target Files:
trigger_words.py
17. Menu Refactor (Cog Wheel) COMPLETED
- Problem: Header is cluttered.
- Status: Moved Go To #, Cols, and Reset Zoom into a cog wheel (gear icon) dropdown menu. Added SVG gear icon button, CSS for dropdown menu with items, click-outside-to-close, and Esc key handling.
- Target Files:
resources/template.html,resources/logic_ui.js,resources/report.css
**18. Optionally Pack workflow into images ** (low priority)
- Problem: Pack workflow into images optionally
- Instruction:
- Modify
image_generation.py: Insave_image_to_disk. - Implementation: Use
PIL.PngImagePlugin.PngInfo. Create aPngInfoobject. Addinfo.add_text("prompt", json.dumps(prompt)). Pass thispnginfotoimage.save(). - Data Source: Ensure the raw prompt/workflow is passed down from
sampler_node.py.
- Target Files:
image_generation.py,generation_orchestrator.py
20. Hotkeys Reference List COMPLETED
-
Problem: Users don't know shortcuts.
-
Status: Already implemented in
resources/template.htmlas a KEYBOARD SHORTCUTS section in the Filters & Info popup, with a table showing Space, Shift+Space, Arrow Keys, +/-, 0, F, and Shift+Click shortcuts. -
Target Files:
resources/template.html
21. Virtual DOM Pan/Zoom (Canvas Builder) (low priority)
- Problem: The Config Builder UI (graph node) needs infinite canvas capabilities for large node graphs.
- Instruction:
- Scope Check: If this refers to the Dashboard, it's done (
logic_virtual.js). If this refers to the Config Builder Node UI (web/config_builder.js), it needs HTML5 Canvas implementation. - Implementation: In
web/config_builder.js, wrap the main container in a parentdivwithoverflow: hidden. Implementmousedown(start pan),mousemove(update transform translate),wheel(update transform scale) event listeners on the container.
- Target Files:
web/config_builder.js
22. Import Configs (Merge) (low priority)
- Problem: Can only load full sessions, not merge snippets.
- Instruction:
- Backend:
config_utils.pyhandles parsing. - Frontend (
web/config_builder.js): Add "Import JSON" button. - Logic: On click, open file picker. Read JSON. Iterate through arrays in JSON. Push them into
this.state.config_arrays. Callthis.renderUI().
- Target Files:
web/config_builder.js
23. Pseudo-JSON Nodes (Recursion) (low priority)
- Problem: Advanced. Running a raw JSON workflow as a sub-node.
- Instruction:
- Modify
json_text_node.py: This needs to interface withcomfy.nodes.GraphExecutor. - Logic: Treat the input JSON as a "Group Node". Map the inputs of the
SamplerGridTesterto the inputs defined in the JSON. Execute the subgraph. Return the latent.
- Target Files:
json_text_node.py,sampler_node.py
24. Combinatorial Randomization - More Randomization tools - generate x configs from y possibilities and z prompts - (low priority)
- Problem: Feature. Combinatorial generation logic. Combine random prompts with random loras, fun!
- Instruction:
- Modify
config_builder_node.py: Ingenerate_config. - Logic: Add a "Random Sample" mode. Instead of
itertools.product(all combos), userandom.sample(all_combos, k=N).
- Target Files:
config_builder_node.py
25. Double Click Filter (Isolate) - (low priority)
- Problem: Tedious to uncheck all other filters.
- Instruction:
- Modify
resources/logic_ui.js: When generating filter tag buttons. - Event: Add
ondblclick. - Logic: On double click, clear all other filters in that category and select only the clicked one. Call
logic_pipeline.update().
- Target Files:
resources/logic_ui.js
26. Path Validation in Builder (low priority)
- Problem: Add validation check to builder for lora and model paths
- Instruction:
- Modify
web/config_builder.js: In the rendering loop for models/LoRAs. - Check: Compare input value against
availableModels/availableLorasarrays. - UI: If not found, add
border: 1px solid redand a tooltip "File not found".
- Target Files:
web/config_builder.js
COMPLETED
27. Refresh Model List COMPLETED
Show Rejected ASDFeature COMPLETED
- Problem: Rejected images disappear; hard to undo.
- UI: Added a toggle button for rejected in the Filters menu.
2. Session Load: Disable Auto-Save & Safe Filename COMPLETED
**6. Copy Favorites To Favorites Subfolders Based On LoRA Sets ** COMPLETED
4. Fix Lora Trigger Append Position COMPLETED
15/16. Lookahead Caching Switch & Debug COMPLETED
Add "Don't Append" option to Append Lora Triggerwords To: section. (Adds all triggerwords to omit lora triggerwords list. COMPLETED
Feature: LoRA Lookup From Builder UI. Get metadata, images, url, tags, & more to view quickly from builder in comfyui
Fix: Manifest doesn't need lora omit triggers list in every item. Save civitai lookup hashes when calculating lora short 256 and looking up lora trigger words. For use later with civit lookup lora / model info. Save all meta-data from lookup in a folder in output/benchmarks/model-data/{modelName} COMPLETED
Prompts manager section in config builder, browse & combine past prompts, analyze favorited tags, auto generate tag tests, COMPLETED