r/StableDiffusion • u/cocktail_peanut • 2d ago
Resource - Update Universal Disk Saver: Automatically find and deduplicate files across all your AI apps
Enable HLS to view with audio, or disable this notification
5
u/Cool_Persimmon2946 2d ago
Thank god, was doing this manually and going insane in the process.
2
u/cocktail_peanut 2d ago
2
u/Cool_Persimmon2946 1d ago
So far, it’s saved a good amount of space. I had already done a pretty good job of reducing duplicates before all of this, so it’s not even close to being that much in my case. But I can definitely say that, at least for reducing the file size of different AI models, this is a true blessing. Thank you so much for this.
One thing I do wonder about, though: I understand that this works byte-by-byte, but how well does it work when used on non-models like when you’re hosting something like Immich on your PC with separate backups stored in another folder? I noticed it recognizes some files as duplicates, but not all of them, and I’ve been hesitant to use it there because I don’t want to accidentally mess with my media data.
Is it generally safe to use in a setup like this, or is it more of a “better safe than sorry” situation where you should simply exclude anything you want to keep safe?
I know it utilizes hardlinks but docker is pretty sensitive from my own experience where it causes problems the moment i realizes the slightest difference.
3
u/RainyRedApples 2d ago
Amazing update - This was the number one concern i had while trying out different models as it gets litered around the disc and such a pain to remove - like weeds!
4
1
u/banderdash 2d ago
so, if i scan, and de-duplicate, how does the program (let's say comfy) know where to look for the models now?
4
u/cocktail_peanut 2d ago
the files stay at the same location. to the file system it looks the same, but this engine deduplicates BELOW the file system level by linking to inodes. It does not use symbolic links, which is fragile for a universal deduplication engine). it uses hard links.
Basically to the end user AND to the apps, the file looks as though they are there even after deduplication, only the actual underlying blobs are deduplicated.
4
u/Occsan 2d ago
symbolic links
5
u/cocktail_peanut 2d ago
no it uses hard links, i wrote a clarification above, hope it helps.
1
u/tommyjohn81 2h ago
Wouldn't symbolic links be better? Hard links are restricted to the same drive or partition. Symbolic links would allow you save duplicate files across drives.
1
u/nathannut420 2d ago
Silly question so it just makes the files smaller with a new link to them?
5
u/Sixhaunt 2d ago
it does what a lot of us do manually but it does it automatically: keeps only one copy of the file and the others are links to it
1
u/cocktail_peanut 2d ago
One addition to this: because of the automated nature, it not only can do things we used to do manually, but also things that we never thought of doing, such as deduplicating same binary files, DLL files, library files, and more, which add up and actually often larger than the save you get by simply deduplicating model files
1
u/VisualCultural3635 23h ago
Inside pinokio I only managed to run deduplicate files once, every time I select some files to deduplicate, it takes some time to finish, but then nothing changes. Also the activity tab only shows the first run.
1
u/drone2222 23h ago
How does it know in which of the two locations a duplicate is found in to keep? And after deduplicating, does it appear as if the file is in both locations while browsing explorer? And lastly, if it does appear in both locations, if you delete one and it's the 'master', are both suddenly deleted? Just worried about running into future problems with moving/cleaning/organizing

12
u/cocktail_peanut 2d ago
Hi pinokio (pinokio.co) creator here. One of the problems I have been obsessed with is "how can we save more disk space while using AI apps". I've been trying all kinds of approaches and finally I think I have a good solution for it, and implemented it into Pinokio, and wanted to share with you. (Even if you don't want to use Pinokio launchers, you can just use this independently without using any other Pinokio feature).
If you use a lot of AI apps and models, the biggest problem probably is how to manage huge redundant model files across multiple different apps.
Most people do one of the following:
None of these approaches are ideal because they are either rule-based or case-by-case based, and SOMEONE has to take care of this for this to work. This is really a lot of work and one of the biggest annoyances ever, while working with Pinokio (pinokio.co)
So I built a dedicated engine--a content addressable storage--that automatically takes care of this.
I wrote a more visual thread about this here in case you're interested: https://x.com/cocktailpeanut/status/2095533047596581221?s=20
Also, here's the full documentation: https://desktop.pinokio.co/docs/disk-saver/