Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Technical reference:
https://github.com/lllyasviel/Fooocus#list-of-hidden-tricks
https://github.com/lllyasviel/Fooocus/blob/d16a54edd69f82158ae7ffe5669618db33a01ac7/modules/patch.py#L265
https://arxiv.org/pdf/2307.01952 (2.2 Micro-Conditioning)
https://huggingface.co/docs/diffusers/main/en/using-diffusers/sdxl#size-conditioning
At present, both Fooocus and DrawThings use this trick. After testing, it does get better output results than ComfyUI, diffusers, GuernikaKit, with better color contrast and detail sharpness.
At the same time, it will also cause the same seed to be unable to reproduce the results of ComfyUI and diffusers.
In addition, I set both the original size and the target size to the input size, and it should be able to get a better photographic composition. It can avoid the occurrence of repeated objects in a large aspect ratio such as 1536x640.
The following is the comparison test. On the left is the result of not using this PR:
The premise is that I added another modification here:
https://github.com/GuernikaCore/Schedulers/blob/1f517514d679e38bb9915c3a74bf04f75d5b5875/Sources/Schedulers/DPMSolverMultistepScheduler.swift#L253
Do you have a better solution?