allusion-app / Allusion

A free and open source desktop application for managing your visual library
GNU General Public License v3.0
662 stars 42 forks source link

Fix implied tag search #625

Closed PlayWolfYT closed 2 months ago

rafstahelin commented 2 months ago

is copy to clipboard being added to allusion? I really need it!

Antoine-lb commented 2 months ago

@PlayWolfYT would you mind if we merge this branch with our Allusion fork? https://github.com/OneFolderApp/OneFolder

PlayWolfYT commented 2 months ago

@PlayWolfYT would you mind if we merge this branch with our Allusion fork? https://github.com/OneFolderApp/OneFolder

Hey there, ofc, you can use this however you like. I made some more changes over on my own fork https://github.com/PlayWolfYT/Allusion if you're interested on looking at that. I actually made this pull request on accident since I wanted to pull it into my own repo haha

rafstahelin commented 2 months ago

What extras are added to this fork?

PlayWolfYT commented 2 months ago

I added 3 (or rather 4) features to my fork. The copy paste made by @AlanDrake, the implied tags feature (which allows for some tags to imply others, makes grouping less of a pain), and header tags (denoted by "#", they are normal tags but appear bigger and bold, meant to be used for grouping, similar to folders).

The 4th one was modifying the browser extension to allow web-pages to send images through a custom event to Allusion. This was done with a (self) modified version of "ComfyUI" in mind, which doesnt have images as "" tags, but rather has them drawn on a canvas. It is possible to open the images in a new tab and then (since they are native images at that point) add them to Allusion through the context menu this way, but I just wanted to remove that unnecessary step by adding a custom button in the context menu of ComfyUI.

If you decide to copy over multiple features do pay attention on what you copy, since I have also added a small toast on startup indicating that the modified version was made by me (I added this to make sure the updating and installations worked correctly).

rafstahelin commented 2 months ago

Awesome, thanks!

I am going to try to switch from master to your fork. But just realised maybe one needs to compile your fork, which I don’t know how to. Do you have an install file?

Also, if i can install it, here’s a question: I use One Commander as my default file explorer. When I drag an image to Windows file explorer, the behavior is a copy. But when I drag an image to One Commander, the behaviour is move. The dev from OC says it’s on Allusion’s side. Is there a fix for this?

On Fri, 26 Apr 2024 at 18:38, PlayWolfYT @.***> wrote:

I added 3 (or rather 4) features to my fork. The copy paste made by @AlanDrake https://github.com/AlanDrake, the implied tags feature (which allows for some tags to imply others, makes grouping less of a pain), and header tags (denoted by "#", they are normal tags but appear bigger and bold, meant to be used for grouping, similar to folders).

If you decide to copy over multiple features do pay attention on what you copy, since I have also added a small toast on startup indicating that the modified version was made by me (I added this to make sure the updating and installations worked correctly).

— Reply to this email directly, view it on GitHub https://github.com/allusion-app/Allusion/pull/625#issuecomment-2079727773, or unsubscribe https://github.com/notifications/unsubscribe-auth/APNXTFRZ2X5JZYUCH5FF7TDY7J7JFAVCNFSM6AAAAABGVOT4Y6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZZG4ZDONZXGM . You are receiving this because you commented.Message ID: @.***>

PlayWolfYT commented 2 months ago

The install file should be available in the releases tab (https://github.com/PlayWolfYT/Allusion/releases). From there you should be able to just download the installer you require. The compilation-process is the same as with Allusion itself (not sure exactly how it works either, but they have a CI/CD Pipeline set up for it which is triggered when a new Tag is created whoose name starts with "v", for example "v1.0.0-rc.23-custom").

As for your question about One Commander: I have never heard of One Commander before, so in that regard no. I could look into it at a later date and let you know if I manage to figure it out if you want, though that might take a week or two since I also would have to get to know One Commander first.

rafstahelin commented 2 months ago

One Commander is super awesome. It’s an alternative to shitty old file explorer. I highly recommmend to power manage files. Definitely have a Quick Look when you can. As for myself, this little difference in Allusion makes a huge difference to how I interact with Allusion. Cuz dragging images from Allusion to organise folders for creation is the natural intuitive way. Copy and paste is great as well for sure. Would love to get his power up drag option to OC if and when you get time. Thanks Best, Raf On 26 Apr 2024, at 18:50, PlayWolfYT @.***> wrote: The install file should be available in the releases tab (https://github.com/PlayWolfYT/Allusion/releases). From there you should be able to just download the installer you require. The compilation-process is the same as with Allusion itself (not sure exactly how it works either, but they have a CI/CD Pipeline set up for it which is triggered when a new Tag is created whoose name starts with "v", for example "v1.0.0-rc.23-custom"). As for your question about One Commander: I have never heard of One Commander before, so in that regard no. I could look into it at a later date and let you know if I manage to figure it out if you want, though that might take a week or two since I also would have to get to know One Commander first.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

rafstahelin commented 2 months ago

Alrright, installed your version.

ok the # works. the copy paste not working. how do I copy an image from allusion and paste in file explorer, assuming that is what you meant by copy paste feature

Drag to One Commander for copy behavior works actually. No further action!

Implied tags. I cannot get it to work. I assume dragging a parent tag to an image would bring the child tags as well, but this is not happening. Do I misunderstand?

On Fri, Apr 26, 2024 at 6:38 PM PlayWolfYT @.***> wrote:

I added 3 (or rather 4) features to my fork. The copy paste made by @AlanDrake https://github.com/AlanDrake, the implied tags feature (which allows for some tags to imply others, makes grouping less of a pain), and header tags (denoted by "#", they are normal tags but appear bigger and bold, meant to be used for grouping, similar to folders).

If you decide to copy over multiple features do pay attention on what you copy, since I have also added a small toast on startup indicating that the modified version was made by me (I added this to make sure the updating and installations worked correctly).

— Reply to this email directly, view it on GitHub https://github.com/allusion-app/Allusion/pull/625#issuecomment-2079727773, or unsubscribe https://github.com/notifications/unsubscribe-auth/APNXTFRZ2X5JZYUCH5FF7TDY7J7JFAVCNFSM6AAAAABGVOT4Y6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZZG4ZDONZXGM . You are receiving this because you commented.Message ID: @.***>

-- thanks

best regards, raf

AlanDrake commented 2 months ago

The copy addon I made is for copying the image into memory, not as a file.

PlayWolfYT commented 2 months ago

Hey there @rafstahelin

The Copy-Paste is when you go onto an image and then "Rightclick > Copy" image This copies the image to the clipboard. From there you can then paste it to whereever you want.

The implied tags work the following way: Step 1. Have multiple tags (or create them), for this example: "Tag A" and "Tag B" Step 2. Right-Click the tag you want to change implied tags for, then go to "Modify Implied Tags", For example: Right click "Tag A" -> Modify Implied Tags Step 3. In the now opened popup, select the tags that the previously selected tag should imply. (Note, like the popup also says, you cannot imply child or parent tags, as parent tags are implied either way and child-tags would break the system), For Example: Select "Tag B" as an implied tag Step 4. Save (duh) Step 5. Apply the desired tag onto an image, in this case "Tag A"

On the image you would then have just "Tag A". This is intended. If you now try to search for images with "Tag A", the image would of course show up, since it has the tag. But if you search for "Tag B", the image would also show up, since the "Tag A" is implying that the "Tag B" also applies.

The tag-implication-system is currently just meant for searchability. Though now that you mention it, it would make sense to have some sort of visual indicator on what tags are implied (except for manually checking all the tags of course).

rafstahelin commented 2 months ago

ok cool, i get implied now, now that I've looked deeper into it.

Re: copy, when I copy with right click, I actually do not get a copy option nor does ctrl+C do anything (which I assume is normal and only the right click should work)

I am on your fork as you can see. Weird

[image: image.png] [image: image.png]

On Fri, Apr 26, 2024 at 10:59 PM PlayWolfYT @.***> wrote:

Hey there @rafstahelin https://github.com/rafstahelin

The Copy-Paste is when you go onto an image and then "Rightclick > Copy" image.png (view on web) https://github.com/allusion-app/Allusion/assets/34193051/9f706759-5e9a-470a-b8ef-8e133b795c21 This copies the image to the clipboard. From there you can then paste it to whereever you want.

The implied tags work the following way: Step 1. Have multiple tags (or create them), for this example: "Tag A" and "Tag B" Step 2. Right-Click the tag you want to change implied tags for, then go to "Modify Implied Tags", For example: Right click "Tag A" -> Modify Implied Tags Step 3. In the now opened popup, select the tags that the previously selected tag should imply. (Note, like the popup also says, you cannot imply child or parent tags, as parent tags are implied either way and child-tags would break the system), For Example: Select "Tag B" as an implied tag Step 4. Save (duh) Step 5. Apply the desired tag onto an image, in this case "Tag A"

On the image you would then have just "Tag A". This is intended. If you now try to search for images with "Tag A", the image would of course show up, since it has the tag. But if you search for "Tag B", the image would also show up, since the "Tag A" is implying that the "Tag B" also applies.

The tag-implication-system is currently just meant for searchability. Though now that you mention it, it would make sense to have some sort of visual indicator on what tags are implied (except for manually checking all the tags of course).

— Reply to this email directly, view it on GitHub https://github.com/allusion-app/Allusion/pull/625#issuecomment-2080110826, or unsubscribe https://github.com/notifications/unsubscribe-auth/APNXTFVTLGKCOI2VZOHX4O3Y7K5Z3AVCNFSM6AAAAABGVOT4Y6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBQGEYTAOBSGY . You are receiving this because you were mentioned.Message ID: @.***>

-- thanks

best regards, raf

rafstahelin commented 2 months ago

ok i got it, copy paste only works when you double click enlarge an image, not on thumbnails. i would have thought copy would work especially when selecting multiple images. no worries. looking forward to future updates!

i would especially love it if the Tags fonts would change color with the tag icon itself but that's just me

anyway, thanks so much. very grateful for the fork

rafstahelin commented 2 months ago

Hey @PlayWolfYT not too sure where to put this feature request for your awesome fork, but I would love the Allision to sort folders by date. I'm renaming images a lot with hard baked names that don't go away with tags disappearing by my mistake. But whenever I rename a file it goes to the top and date is reset to today. It would be nice if only I could tell Allusion to sort files first by date of parent folder, so even when image changes it is within the parent folder's date which never changes and has the date as name (most of my images are from webui ai inference which by default creates date folders for every day inference

Just thought maybe this was doable and would make allusion 0.29 the best in its modality

schroef commented 2 months ago

You can build and test branch bu checking the main readme.md, it explains how to use vscode and simply either use test build or actual build

https://github.com/allusion-app/Allusion

PlayWolfYT commented 2 months ago

Hey @PlayWolfYT not too sure where to put this feature request for your awesome fork, but I would love the Allision to sort folders by date. I'm renaming images a lot with hard baked names that don't go away with tags disappearing by my mistake. But whenever I rename a file it goes to the top and date is reset to today. It would be nice if only I could tell Allusion to sort files first by date of parent folder, so even when image changes it is within the parent folder's date which never changes and has the date as name (most of my images are from webui ai inference which by default creates date folders for every day inference

Just thought maybe this was doable and would make allusion 0.29 the best in its modality

Hey there, generally I think it would be best to open an issue on my fork directly when refering to me for an implementation of something, no worries though.

As for your request, from how I use Allusion (which is also with AI Images and hard-baked names), renaming should not put the image back to the top (unless sorting for "Date Modified"). If you sort by "Date added" (Date when the File was imported to Allusion) or "Date created" (Date when the file was created) it should remain in the same place, as those dates shouldnt change when renaming.

rafstahelin commented 2 months ago

Sweet, that should do it. I might have missed the sorting order modes. Thanks

rafstahelin commented 2 months ago

Hey @PlayWolfYT not too sure where to put this feature request for your awesome fork, but I would love the Allision to sort folders by date. I'm renaming images a lot with hard baked names that don't go away with tags disappearing by my mistake. But whenever I rename a file it goes to the top and date is reset to today. It would be nice if only I could tell Allusion to sort files first by date of parent folder, so even when image changes it is within the parent folder's date which never changes and has the date as name (most of my images are from webui ai inference which by default creates date folders for every day inference

Just thought maybe this was doable and would make allusion 0.29 the best in its modality

Hey there, generally I think it would be best to open an issue on my fork directly when refering to me for an implementation of something, no worries though.

As for your request, from how I use Allusion (which is also with AI Images and hard-baked names), renaming should not put the image back to the top (unless sorting for "Date Modified"). If you sort by "Date added" (Date when the File was imported to Allusion) or "Date created" (Date when the file was created) it should remain in the same place, as those dates shouldnt change when renaming.

@PlayWolfYT

I'm really curious how you organise your ai images. Do you have a pattern, ie model, project, workflow, sampler, seed? Do you leave files in same location as your output or do you move starred selects to a new location? I know this is more of a personal backend system thing, but I've been toying with different approaches, and would love any helpful tips that might make the most of the Allison functionalities.

On a side note regarding auto1111 grids, png's of 8000px+ size slow down loads. So I've kept the output path for grids on a separate location to avoid slowing down the viewer. What's you take on that?

Anyway, any insights into renaming patterns would be appreciated

PlayWolfYT commented 2 months ago

Hey @PlayWolfYT not too sure where to put this feature request for your awesome fork, but I would love the Allision to sort folders by date. I'm renaming images a lot with hard baked names that don't go away with tags disappearing by my mistake. But whenever I rename a file it goes to the top and date is reset to today. It would be nice if only I could tell Allusion to sort files first by date of parent folder, so even when image changes it is within the parent folder's date which never changes and has the date as name (most of my images are from webui ai inference which by default creates date folders for every day inference

Just thought maybe this was doable and would make allusion 0.29 the best in its modality

Hey there, generally I think it would be best to open an issue on my fork directly when refering to me for an implementation of something, no worries though. As for your request, from how I use Allusion (which is also with AI Images and hard-baked names), renaming should not put the image back to the top (unless sorting for "Date Modified"). If you sort by "Date added" (Date when the File was imported to Allusion) or "Date created" (Date when the file was created) it should remain in the same place, as those dates shouldnt change when renaming.

@PlayWolfYT

I'm really curious how you organise your ai images. Do you have a pattern, ie model, project, workflow, sampler, seed? Do you leave files in same location as your output or do you move starred selects to a new location? I know this is more of a personal backend system thing, but I've been toying with different approaches, and would love any helpful tips that might make the most of the Allison functionalities.

On a side note regarding auto1111 grids, png's of 8000px+ size slow down loads. So I've kept the output path for grids on a separate location to avoid slowing down the viewer. What's you take on that?

Anyway, any insights into renaming patterns would be appreciated

I don't really have much of an organisation to be honest. I modified my ComfyUI-Installation to have an "Add to Allusion" button (with the Allusion browser extension), so when I generate an Image I can send it to Allusion, including any Tags that were present in the prompt (for example "a guy at a beach, male, beach, solo" would automatically detect the tags "male", "beach" and "solo" if those exist and attach them to the image in Allusion). I have all the images in a singular folder (since tagging them with Allusion removes my need for seperate folders), but I just have them for personal use and to share with friends either way, so there's not much of a need for really good categorization. For favorites, I don't have a system in place for that at the moment, though I might simply make a "Favorite" tag in Allusion and then just assign that tag to those specific images.

About the large png sizes: I mainly have 2048px images, therefore I don't experience a lot of lag either way. But from what I found in the source code Allusion loads the actual (full size) images only when your view settings are set pretty high. When you see a lot of images at once (i.e. the previews are not very large) Allusion generates a smaller webp-thumbnail image and stores it in a specific folder (changeable in settings, defaults to somewhere in AppData I think?). Sadly I don't think there is a good way of avoiding slow-downs with lots of big-sized images like you have. The way Allusion does it is already fairly optimized.

As for renaming, my Allusion is basically full with "ComfyUI.png", "ComfyUI 2.png", "ComfyUI 412.png" etc etc. Since the images are tagged I literally don't rename them haha.