TinyTerra / ComfyUI_tinyterraNodes

A selection of nodes for Stable Diffusion ComfyUI
GNU General Public License v3.0
332 stars 39 forks source link

in pipeKSampler, a strange phenomenon when the seed option is converted to input #117

Closed xiexiaobo135 closed 1 month ago

xiexiaobo135 commented 1 month ago

https://github.com/TinyTerra/ComfyUI_tinyterraNodes/assets/7458194/f62dfb46-c1b7-4672-bb5d-457817a605a7

  1. 'seed' It takes 2 clicks to convert successfully;
  2. can't convert back;
  3. after the above operations, an error message is displayed when the page is refreshed
xiexiaobo135 commented 1 month ago

after refresh, error: Loading aborted due to error reloading workflow data

TypeError: Cannot read properties of undefined (reading 'type') TypeError: Cannot read properties of undefined (reading 'type') at hideWidget (http://127.0.0.1:8188/extensions/core/widgetInputs.js:25:13) at hideWidget (http://127.0.0.1:8188/extensions/core/widgetInputs.js:47:4) at nodeType.onGraphConfigured (http://127.0.0.1:8188/extensions/core/widgetInputs.js:332:7) at app.graph.onConfigure (http://127.0.0.1:8188/scripts/app.js:1336:29) at s.graph.onConfigure (http://127.0.0.1:8188/workspace_web/AppIsDirtyEventListener-RiQS-RgK.js:1:1071) at LGraph.configure (http://127.0.0.1:8188/lib/litegraph.core.js:2260:9) at LGraph.configure (http://127.0.0.1:8188/scripts/app.js:1323:22) at LGraph.configure (http://127.0.0.1:8188/extensions/ComfyUI-Custom-Scripts/js/reroutePrimitive.js:14:29) at LGraph.configure (http://127.0.0.1:8188/extensions/ComfyUI-Custom-Scripts/js/snapToGrid.js:69:21) at ComfyApp.loadGraphData (http://127.0.0.1:8188/scripts/app.js:1767:15) This may be due to the following script: /extensions/core/widgetInputs.js

Snipaste_2024-05-27_01-18-32

workflow (1).json

TinyTerra commented 1 month ago

This works as expected with no other custom nodes installed.

Do you have a different custom node installed that modifies the default widgetInputs.js functionality?

xiexiaobo135 commented 1 month ago

Thanks for your reply, I found that when I tried to remove the plugin package one by one, the problem disappeared when I arrived at comfyui-easy-use, I'll submit the issue over there

xiexiaobo135 commented 1 month ago

https://github.com/TinyTerra/ComfyUI_tinyterraNodes/blob/6375107b02a58e63d8ed80a94141439d390e6b54/js/ttNwidgets.js#L13 The problem is that the 'control before generate' judgment is not made.
This may be caused by comfyui bug, if it does not affect your logic, can you modify it? Close this issue if you don't think it's necessary,

// else if (w.name === "control_after_generate") {
else if (w.name === "control_after_generate" || w.name === "control_before_generate") {
TinyTerra commented 1 month ago

Ah i see, base comfy only updates the display name when using before gen, not the backend widget name. I've added the additional check for compatibility with EasyUse