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

Bug: Save Original Image-option - Doesn't work as expected? #181

Open
MNeMoNiCuZ opened this issue Dec 3, 2023 · 9 comments
Open

Bug: Save Original Image-option - Doesn't work as expected? #181

MNeMoNiCuZ opened this issue Dec 3, 2023 · 9 comments

Comments

@MNeMoNiCuZ
Copy link

It is a bit unclear how to use the "Save original image" option.
By the sound of it, this option should save BOTH the originally generated image, but also the modified one.

But if I uncheck this option, no image is saved.

If I check it, the modified image is saved, but I get no "original image" (i.e. unmodified by face-editor).

It feels like this extension should not cancel any A1111 option to save or not save the final image.
It makes sense to have the option to save tho original un-edited image too, as an option here.

But I think it's broken.
What is the intended result here?

@ototadana
Copy link
Owner

In my environment, it is working as expected. That is, if "Save original image" is enabled, both the image before modification by the Face Editor and the image modified by the Face Editor are saved; if not enabled, only the image modified by the Face Editor is saved.

If it is not moving like this, it is most likely one of the following:

  • An error has occurred and it is not working properly
  • Because no face was detected, the Face Editor did not modify the image, and only the image before the modification was saved.

In the former case, you should see an error message in the console. In the latter case, you can check if the faces are detected correctly by enabling "Show intermediate steps". If it is successful, the following image will be displayed.
image

Please check this.

@MNeMoNiCuZ
Copy link
Author

There is something else going on.

If I generate an image and have Face Editor on, it works fine and saves.
If I turn on "Hires Fix", it doesn't save.
If I turn on "Hires Fix" and also set a custom "Hires Checkpoint", it doesn't save.

So it looks like it's a bug when using hires fix?

No hires fix:
image

When hires fix is turned on:
image

Exactly the same settings for the rest. "Show intermediate steps" etc.

@ototadana
Copy link
Owner

This is probably because the detected face size is larger than the face size for modification (512px), so the processing is skipped.

For general facial improvement purposes, processing is not necessary in these cases. Processing in such cases may even make them worse. Therefore, processing is skipped by default.

If you wish to perform processing in this case as well, you can choose one of the following options:

  • Disable "Advanced Options - (2) Crop and Resize the Faces - Ignore faces larger than specified size".
  • Disable "Auto face size adjustment by model" in "Settings" and change "Advanced Options - (2) Crop and Resize the Faces - Size of the face when recreating" to a larger value (e.g. Change the value to 1024.

For more information, please refer to the following:

@MNeMoNiCuZ
Copy link
Author

Thanks for the info! I will try it out tomorrow.
But, regardless if it performs any operation, it shouldn't actually block the normal output, right? Yet as it is, it does by default, without informing the user sufficiently about why this happened. I feel like this could probably be avoided.

@MNeMoNiCuZ
Copy link
Author

I disabled the option to "Ignore faces larger than specified size". This resolved my issue, thanks for sharing!

I personally don't think it's a good default to have enabled. But that's just one point of feedback. ADetailer doesn't care about this, it trusts the user to own the result.
Don't get me wrong, it's a GREAT option to have, I'm just skeptical about the default value.

But at any rate, I don't think it's right that no image is saved. I don't even get the original image. The save process from A1111 is interrupted and generations are completely ignored when this combination of options are on.

@ototadana
Copy link
Owner

Thanks for your feedback.

But at any rate, I don't think it's right that no image is saved. I don't even get the original image. The save process from A1111 is interrupted and generations are completely ignored when this combination of options are on.

That is an unexpected behavior. The original image will still be saved in this case.

Perhaps the "Save original image if face detection fails" option in Setings is unchecked? This option is turned on by default, so unless you explicitly turn it off, it should be valid, but please check just to be sure.

@MNeMoNiCuZ
Copy link
Author

Thinking more on it, I do agree that it should be default of "Ignore faces larger than specified size" should actually be true, otherwise we're just downgrading the generation.

My actual issue is of course that it's blocking the output.

Regarding the images being blocked:

image
This is indeed enabled. I think there's a bug on my side. For me it's reproducable.

A friend tested it as well and they are also having similar issues, but slightly different.
For them, ONLY images with faces are saved. See the screenshot below and note how the timestamps are highly irregular. This is from running "Generate forever", so they should be consistent.
image

They also had the "Ignore faces larger than specified size" checked, and when they unchecked it, they get all images saved again. And the "Save original image if face detection fails" was also checked for them.

Their results:
Only face-fixed images are saved. No other images were saved.

@ototadana
Copy link
Owner

I see... Are there any errors in the console?

@MNeMoNiCuZ
Copy link
Author

I have tried to recreate this issue now but I cannot seem to reproduce it.
The behavior is now as expected for me.

If it appears again I can look for and re-open this. The only thing I expect the console output to tell me is "number of faces: 0."
This is the only thing I see in the log right now.

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

No branches or pull requests

2 participants