-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: preview method endpoint #6269
base: master
Are you sure you want to change the base?
feat: preview method endpoint #6269
Conversation
* post method `/preview_method` is added comfyanonymous#6205
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there should be an extra endpoint to configure server state, as this makes the server stateful and not suitable for parallel request processing. I would suggest we add the preview method as an optional param to POST /prompt
endpoint, and set the latent_preview there.
The benefit is to make the API less stateful.
I have reviewed the proposed change once again. Using that approach makes the If I think we need to discuss whether this is the right approach in terms of usability. For reference, the previous approach in ComfyUI-Manager was based on the concept of simply changing the global In my opinion, the most natural approach is that, assuming a multi-user scenario, the preview should appear differently based on the |
I understand the goal of having immediate preview updates and per-user configurations. However, storing this state on the server side introduces some important technical considerations:
Instead, I'd suggest:
This approach:
For the specific workflow execution case - the client could include their current preview preferences with each status check request, allowing the server to return appropriately formatted previews without maintaining state between requests. |
To summarize, should I embed the preview method in the queue item so that the queue runs using that preview method? |
+1 Keeping the server stateless. Having a |
/preview_method
is added#6205