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

[Issue]: Hi-Res Fix is not working correctly for the first image on the batch #1845

Closed
2 tasks done
TiagoSantos81 opened this issue Jul 27, 2023 · 14 comments
Closed
2 tasks done
Labels
cannot reproduce Reported issue cannot be easily reproducible

Comments

@TiagoSantos81
Copy link
Contributor

Issue Description

The first pass is using the same dimensional information -- width and weight -- as the supposed final data, although the correct information is shown in on "Hires resize: from XXX:XXX to XXX:XXX". Obvious effect on first pass processing times and the subject duplication effects.

Might be related to the change in resize_mode parameters in c5b089c.

Version Platform Description

This occurs on windows platform on the latest updates. Did not happen two days ago.

Version:
app: automatic.git
updated: 2023-07-09
hash: e8c29597

Platform:
rch: AMD64
cpu: AMD64 Family 23 Model 24 Stepping 1, AuthenticAMD
system: Windows
python: 3.10.9

Relevant log output

No response

Acknowledgements

  • I have read the above and searched for existing issues
  • I confirm that this is classified correctly and its not an extension or diffusers-specific issue
@vladmandic
Copy link
Owner

that was fixed, you're using quite an old version.

@TiagoSantos81
Copy link
Contributor Author

TiagoSantos81 commented Jul 27, 2023

that was fixed, you're using quite an old version.
No, it was updated before the commit you .
The info I am showing is indeed updated at 09-07-2023 but I had made git pull -r before writing this ticket. I just had copy pasted without even looking properly at the info, assuming it to be correct.

Did another git pull moments ago, with success, and I still get the same data in the 'System Information' Tab.

image

This is my 'From Text' Tab:

image

As you can see, it contains the most recent layout changes.

So, it seen there is also some problem in the system info tab, that is not updating correctly the Version section.

@TiagoSantos81
Copy link
Contributor Author

This issue seems to be related only with the first image in the batch. Repeating the seed in another position of the batch seems to fix it, as shown by both images with seed 705512689, shown below:

Second position in the batch:
00296-masterpiece extremely intricate fantasy an on old witch

First position in the batch:
00299-masterpiece extremely intricate fantasy an on old witch

@TiagoSantos81
Copy link
Contributor Author

And the grids showing the issue:

Starting on seed 705512688:
grid-0028-masterpiece extremely intricate fantasy an on old witch

Starting on seed 705512689:
grid-0030-masterpiece extremely intricate fantasy an on old witch

@TiagoSantos81 TiagoSantos81 changed the title [Second Pass]: Hi-Res Fix is not working correctly on SD1.5 models [Second Pass]: Hi-Res Fix is not working correctly for the first image on the batch Jul 27, 2023
@vladmandic
Copy link
Owner

ok, i'll reopen. but this may take a while since i have upcoming trip.

@vladmandic vladmandic reopened this Jul 27, 2023
@TiagoSantos81
Copy link
Contributor Author

No worries. Thank you for looking into it.

@vladmandic vladmandic changed the title [Second Pass]: Hi-Res Fix is not working correctly for the first image on the batch [Issue]: Hi-Res Fix is not working correctly for the first image on the batch Jul 27, 2023
@StableInfo
Copy link

This issue seems to be related only with the first image in the batch. Repeating the seed in another position of the batch seems to fix it, as shown by both images with seed 705512689, shown below:

Second position in the batch: 00296-masterpiece extremely intricate fantasy an on old witch

First position in the batch: 00299-masterpiece extremely intricate fantasy an on old witch

Hello @TiagoSantos81 Do you mind sharing your workflow for this? and prompt?and modelname? This image is so much high quality I am impressed.
Do you do: text2image + hires -> img2img + ultimate sd upscale (+controlnet tiles)? What am I missing?

@TiagoSantos81
Copy link
Contributor Author

Hello @TiagoSantos81 Do you mind sharing your workflow for this? and prompt?and modelname? This image is so much high quality I am impressed. Do you do: text2image + hires -> img2img + ultimate sd upscale (+controlnet tiles)? What am I missing?

Hi! Thank you. I did not know this was that good, since I am mostly testing these technologies, mostly to gain a better developer perspective, potentially for future projects.

This is one of a few first tries with RPGv5, but all other main models I've tested seem to have similar quality, AFAIK.
I just use txt2img, CFG=12 but CFG Scale Fix=7, and the HiRes Fix using Latent (Nearest) Upscaling. To not abuse 1.5 limits I go from Hires resize: from 384x704 to 720x1280. If GitHub does not strip the metadata, you might try downloading the picture and checking it in your own webui image browser.

@vladmandic
Copy link
Owner

can you check if the issue still persists?

@TiagoSantos81
Copy link
Contributor Author

can you check if the issue still persists?

Unfortunately, no. Generated just now, after a git pull -r :
00381-lora Tarotv0 2 0 7 masterpiece extremely intricate

The gen info is:

(masterpiece), (extremely intricate), fantasy, (((an on (old witch)))), (((wearing a black witch hat and black clothes))), (perfect composition:1.4), aspect ratio 1:1, beach, deviantart hd, artstation hd, concept art, detailed face and body, award-winning photography, margins, detailed face, professional oil painting by Ed Blinkey, Atey Ghailan, Jeremy Mann, Greg Manchess, Alex Gray, trending on ArtStation, trending on CGSociety, intricate, high detail, sharp focus, dramatic, award winning matte drawing cinematic lighting octane render unreal engine volumetrics dtx
Negative prompt: UnrealisticDream, (BadDream), nsfw
Steps: 20, Seed: 705512687, Sampler: DPM++ 2M SDE Karras, CFG scale: 12, Size: 384x704, Parser: A1111 parser, Model: rpg_v5, Model hash: bb7e29def5, Latent sampler: DPM++ 2M SDE Karras, Image CFG scale: 6, Denoising strength: 0.5, Refiner start: 0.5, Secondary steps: 20, Version: 8db3797, Pipeline: Original, Operations: "txt2img, hires", Dynamic thresholding enabled: True, Mimic scale: 7, Threshold percentile: 100, Hires resize: 720x1280, Hires steps: 20, Hires upscaler: Latent (nearest)

@vladmandic
Copy link
Owner

i just spent an hour trying to reproduce this. using different batch sizes and batch counts.
plus downloaded same model you've used and used your exact settings.
all-in-all, i cant reproduce at all.

example grid:
image

@vladmandic vladmandic added the cannot reproduce Reported issue cannot be easily reproducible label Sep 1, 2023
@TiagoSantos81
Copy link
Contributor Author

Mind UnrealisticDream, (BadDream) are embeddings, which might change the overall look, but they should not influence the duplicated head issue.
I am also using xformers with medvram, which might not help in reproducibility. I believe I have disabled all not-preinstalled extensions on the first runs I have reported, but I will try to test that again, also without extensions.
You catch me in a busy work period, but I will try to get back to you, ASAP.

@TiagoSantos81
Copy link
Contributor Author

I have made a clean git pull -r, and the issue seems to be solved now, although results seem to be somewhat different for other seeds. The other repo, continues to produce the same issue, despite having an effective git pull -r, and all extensions deactivated.
As far as I can tell, the issue is solved.
Thank you for your time looking into this and solving it.

@TiagoSantos81
Copy link
Contributor Author

Closing this to help with maintenance. Please, reopen if it is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cannot reproduce Reported issue cannot be easily reproducible
Projects
None yet
Development

No branches or pull requests

3 participants