Skip to content

Conversation

@huchenlei
Copy link
Contributor

Currently if the frontend sets a list as widget value, it will be interpreted as a link between 2 nodes. This PR adds an unwrap mechanism to fix this issue. The frontend will wrap the widget value in a dict with reserved key __value__, e.g. {"__value__": [1, 2, 3]}, and the execution engine unwraps it to restore the internal content.

@christian-byrne
Copy link
Contributor

Would it be possible to instead change prompt validation to allow lists?

@huchenlei
Copy link
Contributor Author

Would it be possible to instead change prompt validation to allow lists?

What do you mean change prompt validation?

@christian-byrne
Copy link
Contributor

What do you mean change prompt validation?

Change the validation logic of validate_prompt to accept list inputs which can be marked e.g., using LIST input type.

@comfyanonymous comfyanonymous merged commit d2a0fb6 into master Mar 12, 2025
6 checks passed
@huchenlei huchenlei deleted the unwrap_value branch March 12, 2025 13:55
@huchenlei
Copy link
Contributor Author

What do you mean change prompt validation?

Change the validation logic of validate_prompt to accept list inputs which can be marked e.g., using LIST input type.

I think binding the array value type to a LIST input type is not ideal as that restricts the space for custom nodes. For example, custom nodes author might want to define VEC2, VEC4 for arrays of certain length, instead of just using generic LIST type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants