stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

Add flag `--use-mime-file-filtering-for-batch-from-dir`

Open light-and-ray opened this issue 1 year ago • 7 comments

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:

light-and-ray avatar May 16 '24 22:05 light-and-ray

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.

AUTOMATIC1111 avatar Jun 08 '24 08:06 AUTOMATIC1111

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

light-and-ray avatar Jun 08 '24 09:06 light-and-ray

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.

AUTOMATIC1111 avatar Jun 08 '24 09:06 AUTOMATIC1111

It's optional

light-and-ray avatar Jun 08 '24 09:06 light-and-ray

Hm, is it good idea to move filetype package from requiraments.txt into somewhere else, and install it only of it's required?

light-and-ray avatar Jun 08 '24 10:06 light-and-ray

@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

light-and-ray avatar Jul 07 '24 06:07 light-and-ray

force-pushed = rebased to the last dev

light-and-ray avatar Jul 07 '24 06:07 light-and-ray