-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Feature: HiDiffusion integration #8787
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
Draft
DustyShoe
wants to merge
12
commits into
invoke-ai:main
Choose a base branch
from
DustyShoe:Feature/hidiffusion-integration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ec39445
Initial implementation of HiDiffusion pipeline
DustyShoe 4d52b49
Added URLs to original HiDiffusion repository in documentation and fr…
DustyShoe 8c1b8e2
Added comment next to HiDiffusion in pyproject.toml to clarify its pu…
DustyShoe 514fe8a
Formatting
DustyShoe 979678c
Import order fix
DustyShoe 9c32ada
Add HiDiffusion T1/T2 ratio controls and docs updates
DustyShoe f27143b
Checks appeasing
DustyShoe 6f3aa5a
Refactor HiDiffusion import and update T2 ratio default value to 0
DustyShoe 0c4523c
Merge branch 'main' into Feature/hidiffusion-integration
JPPhoto 0fdc6d9
Changed to vendoring an updated version of HiDiffusion and removed de…
DustyShoe 46d0ecb
Merge branch 'main' into Feature/hidiffusion-integration
DustyShoe 7c0f7df
Merge branch 'main' into Feature/hidiffusion-integration
DustyShoe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| --- | ||
| title: HiDiffusion | ||
| --- | ||
|
|
||
| # HiDiffusion | ||
|
|
||
| HiDiffusion is an optional denoising enhancement that can improve detail and structure at higher resolutions for SD 1.5 and SDXL. It modifies the UNet during denoising and is most noticeable at 1536px and above. | ||
|
|
||
| Learn more: https://github.com/megvii-research/HiDiffusion | ||
|
|
||
| ## Where to find the switches | ||
|
|
||
| 1. Open the **Canvas** tab. | ||
| 2. Expand **Advanced Settings**. | ||
| 3. In the **Advanced** grid, enable **HiDiffusion** and optionally adjust the two sub‑toggles and ratios: | ||
| - **HiDiffusion: RAU‑Net** | ||
| - **HiDiffusion: Window Attention** | ||
| - **HiDiffusion: T1 Ratio** | ||
| - **HiDiffusion: T2 Ratio** | ||
|
|
||
| ## What the switches do | ||
|
|
||
| - **HiDiffusion** | ||
| Enables the HiDiffusion patch for denoising. Use this for high‑resolution generations; the effect is subtle at lower sizes. | ||
|
|
||
| - **HiDiffusion: RAU‑Net** | ||
| Enables RAU‑Net blocks. This typically improves structure and mid‑frequency detail, especially at larger resolutions. | ||
|
|
||
| - **HiDiffusion: Window Attention** | ||
| Enables windowed attention blocks. This can boost local texture/detail, but may slightly affect global coherence in some prompts. | ||
|
|
||
| - **HiDiffusion: T1 Ratio** | ||
| Controls when HiDiffusion switches into its mid‑stage behavior. Lower values switch earlier; higher values preserve global structure longer. | ||
|
|
||
| - **HiDiffusion: T2 Ratio** | ||
| Controls when HiDiffusion switches into its late‑stage behavior. Higher values keep window attention active longer and can sharpen local detail. | ||
|
|
||
| ## Tips | ||
|
|
||
| - Try **1536–2048 px** for the clearest benefits (SDXL). | ||
| - If results look worse, disable **Window Attention** first, then RAU‑Net. | ||
| - Effects vary by scheduler and model; compare with the same seed for a fair test. | ||
|
|
||
| --- | ||
|
|
||
| TODO: Decide whether HiDiffusion toggles and ratios should always be emitted in metadata for recall. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.