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

Add flag --use-mime-file-filtering-for-batch-from-dir #15819

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

light-and-ray
Copy link
Contributor

@light-and-ray light-and-ray commented May 16, 2024

Description

CAN BE MERGED AFTER THIS:

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:

@AUTOMATIC1111
Copy link
Owner

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.

@light-and-ray
Copy link
Contributor Author

light-and-ray commented Jun 8, 2024

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

@AUTOMATIC1111
Copy link
Owner

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.

@light-and-ray
Copy link
Contributor Author

It's optional

@light-and-ray
Copy link
Contributor Author

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

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

Successfully merging this pull request may close these issues.

None yet

2 participants