Skip to content

Conversation

@kandy
Copy link

@kandy kandy commented May 22, 2024

No description provided.

@andrewtvuong
Copy link

Hi @kandy just curious how does cache help, can you give a usecase? Wondering because probably won't see the same image twice or am I mistaken

@kandy
Copy link
Author

kandy commented Jun 6, 2024

I use Tagger in img2img workflows and I often modified parameters at end of workflow, so I don't want that tags is recalculated for the same image and workflow start from start

@jkrauss82
Copy link

I think this is a valuable PR as currently often tags are re-calculated for the same images (not always, haven't been able to figure why).

I have worked on this node yesterday and figured some other things:

  • moving the new parameter "cache" to property "optional" of the node's parameters will help to not break legacy workflows not having the new parameter in their JSON, yet
  • I would recommend to only calculate the hash if cache is True.
  • what about image batches? Does it work for them as well like it is currently implemented?

@OsmosisD
Copy link

Still waiting for this. It causes a lot of wasted overhead when re-running a workflow with other parameters changed, especially when using a larger model such as wd-eva02-large-tagger-v3.
As for recalculation of tags, it seems to be on some sort of timeout (maybe inadvertent?). i.e. if I wait more than a few minutes between each run (or if each run takes longer than that), it recalculates it again, even though it doesn't need to.

Also possibly relevant, if switching back and forth between open workflows, the output from WD14 Tagger vanishes from being displayed. Although this largely seems to be a bug in ComfyUI itself, not all nodes suffer from this problem.

@Dwanvea
Copy link

Dwanvea commented Sep 11, 2025

Please merge this

@EricBCoding
Copy link

As a heads up, the cache mechanism does not work when the node is in a subgraph. It will re-run every time, even if no inputs have changed.

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.

6 participants