ComfyUI Support #281
RupertAvery
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Support for ComfyUI has been... spotty to say the least.
There have been requests for the ability to do a full search on the workflow, but I have not implemented it because I have always been bothered by the approach. The workflow is a JSON structure, and doing a full text search on this (while "reasonably" fast on 200,000+ sets) feels kind of hacky.
First off, there is no context. You could easily match part of a property name, some text in some other field you are not interested in. Also, it's potentially slow.
My initial idea was to allow the user to map a Node property to a A1111 parameter, for example, select the text property of a CLIPTextEncode and map it to Prompt, then rescan the images.
I went so far as to generate a "hash" for each workflow based on the node and property names. The idea was that you could rescan all images generated with the same workflow using the hash.
Recently, however, I decided to try to just parse the node properties into the database.
A workflow is a collection of nodes. An array of nodes really. Each node has inputs, which can be some property and value.
We could then read every node property into the database and search on the properties, instead of the raw JSON text.
This of course creates a LOT of data, so expect your databases to double in size.
I was a bit concerned about inserting the properties and searching through them. 200,000+ images results in around 4,000,000 node properties.
However, I was able to bulk insert the data efficiently and with changes to the querying I was able to query metadata and nodes, maybe even a bit faster than the old versions.
The work is in the ComfyUINodes branch.
If anyone is interested in testing, I'd be happy to setup the Actions to build the branch.
You will need to Rebuild your metadata, which may take a while if you have a lot of images.
Searching and paging does feel a bit more snappier now! This due to changes in the querying, using INNER JOINS instead of WHERE IN. Overall I am happy with the progress so far.
Looking forward for anyone to help test the new features, although be warned there might be some broken stuff (such as folders).
Beta Was this translation helpful? Give feedback.
All reactions