[bug]: expanded graphs may create invalid nodes
Is there an existing issue for this?
- [X] I have searched the existing issues
OS
Linux
GPU
cuda
VRAM
No response
What version did you experience this issue on?
main
What happened?
It's possible to soft-crash the engine by providing a graph that expands into an invalid graph. Two issues here:
-
When a graph is expanded, it is not validated. If it expands to an invalid graph, the invalid graph is stored to the DB, then deserialized during invocation causing pydantic to fail.
-
The exceptions raised in eg
__process()inprocessory.py, inside thewhileloop at ~L38, are not caught properly. The situation in1above thus breaks the execution engine; the API is responsive but no further generations work.
This should be a pretty rare case, but there's a problem with how the UI does iterations and explicit seeds. It's possible to provide an explicit seed equal to (or close enough to) the max seed value, then the seed is incremented by one during graph expansion, until it is greater than the max allowed value. That's how I found this edge case.
Feels like something that is gonna be basically impossible to fully safeguard against in the UI.
Screenshots
No response
Additional context
No response
Contact Details
No response