piyushK52 / comfy_runner

Automatically install ComfyUI nodes and models and use it as a backend
174 stars 24 forks source link

def is_api_json(data) is too strict with its requirement that every dict have a 'class_type', invalidates many workflows #16

Closed vesper8 closed 2 months ago

vesper8 commented 3 months ago

as the title says, I was trying to figure out how to use this tool and it kept saying "invalid workflow" when I tried to use workflows downloaded from various workflow websites. After digging in I found this hard requirement inside is_api_json and it did not seem all that reasonable.. in my case I just commented it out and then I was able to get it to work. I figure other less tech-savvy people would not go this far and just assume the tool doesn't work.. that would be a shame because it's a great tool!

I do wish it had a few extra ways to use it.. I'd like to be able to pass flags that would have it only report on the status of whether a workflow is "ready to use" by determining if anything is missing or unresolved. I'd like to be able to see only what's missing.. and if any of the missing nodes or models are unresolved. And then also have the ability to only download missing nodes or missing models. I'd also like to be able to skip installing ComfyUI and only do the above, assuming an existing ComfyUI installation is somewhere else.

piyushK52 commented 3 months ago
  1. It is the same check that ComfyUI does, so I am not sure how comfy_runner threw an error but ComfyUI ran it correctly. If you can please share the workflow and also tell how you generated it, that will be helpful.
  2. "ready_to_use" status output seems like a good feature, will add it in the coming days
  3. yeah using your existing ComfyUI is very doable, in fact the code is already there (you can change comfy_dir inside constants) but I will expose it as a user input option very soon
piyushK52 commented 2 months ago

@vesper8 closing this issue for now, feel free to open a new one if you have more queries/suggestions