Skip to content

Conversation

@ad-astra-video
Copy link
Collaborator

Add API to install and remove nodes/models for comfystream and comfyui.

Routes are for management per discussion in Notion doc.

@ad-astra-video
Copy link
Collaborator Author

@eliteprox @rickstaa I pushed up my latest updates. I have successfully reloaded the nodes now but it is very hacky and needs tested more. Please let me know your feedback.

The /env/reload route reloads the nodes and creates a new EmbeddedComfyClient. Below is my postman collection for the API routes with the YOLO node saved to install and delete.
comfystream api.postman_collection.json

Steps to reload client:

  1. Load a workflow and run a few frames (needed because the EmbeddedComfyClient does not load comfy ui until work is sent).
    _passthrough_workflow.json
  2. Install a node not in current set (i installed YOLO object detection nodes)
  3. run new workflow that requires the node installed (3 - SD 1.5 TensorRT workflow - ultralytics.json)

Questions to test:

  1. Does the current stream need to be stopped to reload the EmbeddedComfyClient (e.g. fresh comfystream UI before calling /env/reload)
  2. Does this hacky way of unloading and loading the imports and EmbeddedComfyClient cause other problems?

app.router.add_post("/env/delete_models", delete_models)

app.router.add_post("/env/reload", reload)
app.router.add_post("/env/set_account_info", set_account_info)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nit: would suggest the root path to be /settings or /config instead of /env.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants