Fix ComfyUI prompt validation errors for lm_top_k, repainting_start, repainting_end#11
Merged
Merged
Conversation
…README Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix ComfyUI node output validation errors
Fix ComfyUI prompt validation errors for lm_top_k, repainting_start, repainting_end
Mar 14, 2026
Contributor
|
The issue was not resolved: Failed to validate prompt for output 3:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ComfyUI's prompt validation was failing before any node code ran because the widget positional order in
INPUT_TYPESdidn't match what the workflow files had saved, andVALIDATE_INPUTSdidn't cover the three fields ComfyUI was choking on.Two distinct bugs
1. Widget order mismatch — the primary crash
src_audio(STRING) was defined at widget position 18 inINPUT_TYPES, but all four example workflows were serialized withaudio_cover_strength=0.5at position 18 andsrc_audio=''at position 22. This shifted the slot mapping so that position 21 — a''string saved for thelegodropdown — was assigned torepainting_end(FLOAT), causingfloat('')to blow up in ComfyUI's validation layer, beforegenerate()or_coerce_floatwere ever called.Fix: moved
src_audioinINPUT_TYPES(andgenerate()signature) to afterlego, aligning positions with the saved workflow files:2.
VALIDATE_INPUTSincomplete — empty-string bypass missingComfyUI skips its own
int()/float()conversion only for inputs explicitly named inVALIDATE_INPUTS.lm_top_k,repainting_start, andrepainting_endwere not listed, so older user workflows with""serialized for those fields still hitint('')/float('')directly. Added all three alongside the existinglm_top_p/audio_cover_strengthentries.Tests that weren't catching this
lm_top_p) and 18 (audio_cover_strength) were numeric — missing 15, 19, 20src_audioposition relative tolegoVALIDATE_INPUTSat allAdded:
TestValidateInputs(22 cases),test_src_audio_after_lego_in_widget_order,test_generate_widget_count, and numeric-type assertions for all three previously unchecked indices across all four workflow files.README
Added a "Updating an existing installation" section (
git pull+ restart) with a note that users whose workflows show validation errors after an update should delete and re-add the Generate node to reset stale widget values.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.