ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

add API logic to get model hash values ​​based on the property status of the custom node

Open hopeman1986 opened this issue 1 year ago • 1 comments

When generating workflow_api.json in API mode, add logic to get model hash values ​​based on the property status of the custom node ("SaveAllModelHashesNode").

if adding a custom node (SaveAllModelHashesNode) to the diagram to extract model hash values, the logic to get this model hash value is executed in the workflow_api.json generation

if we don't add a cutom node, when creating workflow_api.json, all operations will be the same with previous operation

Uploading getting_model_hash.png…

hopeman1986 avatar Aug 29 '24 11:08 hopeman1986

Hi

When I create workflow_api.json in API mode, I have a custom node SaveAllModelHashesNode and if the save_hash flag is true, I wanted to use the "/api/get_hash" request to get the sha256 model hash value.

In the logic for the "Save (API format)" button of ComfyUI_frontend, there is no APIs to communicate with the server.

So I added this "/api/get_hash" API to the logic for the "Save (API format)" button of ComfyUI_frontend.

Can you please tell me what I can do about this issue?

hopeman1986 avatar Sep 11 '24 15:09 hopeman1986

While model hash data is useful information that would be nice to have APIs for, I don't think this PR is written with experienced intention to effectively build that, this looks more like a personal specific idea you're shoving into the core when it should probably be an extension instead

mcmonkey4eva avatar Sep 16 '24 03:09 mcmonkey4eva