Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wd14 tagger re-runs the same image #72

Open
wulfila07 opened this issue Jul 30, 2024 · 3 comments
Open

Wd14 tagger re-runs the same image #72

wulfila07 opened this issue Jul 30, 2024 · 3 comments

Comments

@wulfila07
Copy link

Why is the tagger re-running even if I keep the same image loaded (already tagged in a previous run)? Is there a way to prevent it?

@metsweet999
Copy link

i think this problem is important,
if resolved, can save lot of time when using workflows, especially the ones have lots of nodes was set after the wd14 tagger.

@metsweet999
Copy link

metsweet999 commented Aug 15, 2024

i did a detailed test, what i have found was:
in the 1st execution, the wd14tagger-node runs (of course),
after the 1st exection, if inputs don't change, in the 2nd execution, the wd14tagger-node re-runs,
after the 2nd exection, if inputs don't change, in the 3rd or later execution, the wd14tagger-node doesn't re-run.

though the wd14tagger-node doesn't re-run every time, but still some problem exists: it shouldn't re-run at the 2nd time, it still wastes user's time.

trying to fix this, i added

   print(f"""Your input contains:
            model:{model}
            threshold:{threshold}
            character_threshold:{character_threshold}
            exclude_tags:{exclude_tags}
            replace_underscore:{replace_underscore}
            trailing_comma:{trailing_comma}
        """)

to line 192 of "custom_nodes\ComfyUI-WD14-Tagger\wd14tagger.py",
then restart comfyui,
in the this node's 1st and the 2nd runs, i got exact same outputs, it means args didn't change in the 2 runs.

maybe its a bug form comyui? don't know, i gave up.

@TheToxin-git
Copy link

TheToxin-git commented Sep 19, 2024

Also did some testing. Defining IS_CHANGED with constant value does not help.
def IS_CHANGED(self, ...): return False

Checked other nodes maintained by this author, ex. pysssss String Function 🐍 with some very basic setup: image

Same behaviour.
Disabled import of all other custom_nodes. Behaviour persists.

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

No branches or pull requests

3 participants