ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

[Question]Why should the 'control_after_generate' parameter in Ksampler be defined in JavaScript?

Open Yoh-Z opened this issue 1 year ago • 4 comments

Why isn't the 'control_after_generate' parameter defined in NODE's INPUT_TYPES like other parameters, and then handle the seed in Python code? Also, are there any other parameters in the 'widgets_values' of the 'workflow.json' file that are processed in the frontend?If so, is there a unified place to manage them?

Yoh-Z avatar May 07 '24 12:05 Yoh-Z

I think it's a result of an old implementation that did not consider things like a 3rd party frontend.

ltdrdata avatar May 07 '24 12:05 ltdrdata

It seems that "widgets_values" cannot correspond one-to-one with the INPUT_TYPES of the node. Is the issue of unmatchable 'control_after_generate' parameters only present in KSampler, KSamplerAdvanced, and PrimitiveNode?

Yoh-Z avatar May 07 '24 12:05 Yoh-Z

It seems that "widgets_values" cannot correspond one-to-one with the INPUT_TYPES of the node. Is the issue of unmatchable 'control_after_generate' parameters only present in KSampler, KSamplerAdvanced, and PrimitiveNode?

It's not just a node problem. Actually control_after_generate is a virtual subwidge of widget which is named seed or noise_seed. And the PrimtivieNode is a special case.

ltdrdata avatar May 07 '24 13:05 ltdrdata

It seems like ComfyUI offers a method to save the workflow in API format. Is there still a need for the functionality of Graph2Prompt to support the use of non-API format workflows through API calls in Python? I've already completed a demo for this feature. If it's still needed, I can submit a pull request for it.

Yoh-Z avatar May 08 '24 03:05 Yoh-Z