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

Possible to filter based on multiple tags? #12

Closed
candre23 opened this issue Feb 28, 2023 · 3 comments
Closed

Possible to filter based on multiple tags? #12

candre23 opened this issue Feb 28, 2023 · 3 comments

Comments

@candre23
Copy link

candre23 commented Feb 28, 2023

Thank you so much for adding .tags support. I can't seem to get it to filter for multiple tags, though. I see that it will recognize a comma as a logical OR, but I haven't found how to make it do a logical AND. IE "tag1, tag2" will display any model with either tag, but I can't figure out how to get it to only display models with both tags.

If this functionality is already present, please let me know how to trigger it. If not, please consider adding it.

Thanks.

@CurtisDS
Copy link
Owner

CurtisDS commented Feb 28, 2023

The filter operation should not be able to do an OR operation. It should only be able to do an AND operation if you separate the tags with a comma.

If you have two models model1.pt and model2.pt and these were your .tags files:

mode1.tags:

#tag1 #tag2

mode2.tags:

#tag1 #tag3

If you entered "#tag2, #tag3" in the filter box no models should appear in the drop down because no models contain both tags.

If you want paste the name and contents of two of the .tags files that you are having trouble with. And the name of the models and Ill see if I can get it to work myself.

@candre23
Copy link
Author

My apologies. I had created a batch file to generate a .tags file in each model directory with all 5 tags that I'm using, and had been going through and removing the inappropriate ones manually (this was easier than typing 2-5 tags for ~300 models). It seems tags are not loaded on demand, so the extension had "remembered" that all models had all 5 tags when the UI was initially loaded. After reloading the UI, it is now working as you describe.

Perhaps the tags could also be displayed on the preview page?

@CurtisDS
Copy link
Owner

CurtisDS commented Mar 1, 2023

Ok, I've added them at the bottom of the preview. I've also changed it so that when you hit the refresh models button 🔄 either at the top next to the checkpoint list or in the extra networks panel it will now update the tags so you don't need to restart the ui to update them.

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

2 participants