stable-diffusion-webui
stable-diffusion-webui copied to clipboard
Add flag `--use-mime-file-filtering-for-batch-from-dir`
Description
Adds flag --use-mime-file-filtering-for-batch-from-dir. Allows passing images with no or with incorrect extension in batch from directory
Also I've fixed a bug when check requirements ignores requirements with no version
And also shared the img2img images walk logic with Extras/Batch from dir, instead of list of files
Checklist:
- [x] I have read contributing wiki page
- [x] I have performed a self-review of my own code
- [x] My code follows the style guidelines
- [x] My code passes tests
Additional changes seem good, but is it really needed to do the mime thing? its more code complexity, more libraries to depend on, and filesystem activity (to guess file type from content) and, as I see it, almost on benefit.
Guessing filerype by its extension is very unreliable. Ar least in Linux world every program uses 'file' command to figure out its format, so there are a lot of files with no extension, and I get used to it
E.g. KDE's Dolphin and Gwenview are filemanager, and do not take a notice on extensions
I'd rather not read the file to find out of it's an image or not unless there really a call for that from users.
It's optional
Hm, is it good idea to move filetype package from requiraments.txt into somewhere else, and install it only of it's required?
@AUTOMATIC1111 I have made an update. Now I install filetype only if needed
I didn't test it, because I cant, but looks like I did everything correctly
force-pushed = rebased to the last dev