Check out the SD-WebUI extension for more information.
This extension enables large image drawing & upscaling with limited VRAM via the following techniques:
- Two SOTA diffusion tiling algorithms: Mixture of Diffusers
and MultiDiffusion
- pkuliyi2015 & Kahsolt's Tiled VAE algorithm.
pkuliyi2015 & Kahsolt's TIled Noise Inversion for better upscaling.
Note
Sizes/dimensions are in pixels and then converted to latent-space sizes.
- SDXL model support
- ControlNet support
-
StableSR support -
Tiled Noise Inversion - Tiled VAE
- Regional Prompt Control
- Img2img upscale
- Ultra-Large image generation
Tip
Set tile_overlap
to 0 and denoise
to 1 to see the tile seams and then adjust the options to your needs. Also, increase tile_batch_size
to increase speed (if your machine can handle it).
Name | Description |
---|---|
method |
Tiling strategy. MultiDiffusion or Mixture of Diffusers . |
tile_width |
Tile's width |
tile_height |
Tile's height |
tile_overlap |
Tile's overlap |
tile_batch_size |
The number of tiles to process in a batch |
If you have the Math Expression node (or something similar), you can use that to pass in the latent that's passed in your KSampler and divide the tile_height
/tile_width
by the number of rows/columns you want.
C
= number of columns you want
R
= number of rows you want
pixel width of input image or latent // C
= tile_width
pixel height of input image or latent // R
= tile_height
![Tile_arrangement](https://private-user-images.githubusercontent.com/54494639/294804111-9952e7d8-909e-436f-a284-c00f0fb71665.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1NDE5NjEsIm5iZiI6MTcyNDU0MTY2MSwicGF0aCI6Ii81NDQ5NDYzOS8yOTQ4MDQxMTEtOTk1MmU3ZDgtOTA5ZS00MzZmLWEyODQtYzAwZjBmYjcxNjY1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI0VDIzMjEwMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdmZWFmZmI3NGNhMjM2ZDkxMmM5YWMzZGNhMWJlNjM0MmZkM2RjYjE5OWE1ZTk0MGU5OTE5NDMwYzU4NWU3YzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0._rUWZ8KP8jnNcX_V_Fy9GkGAsvZ42axPGNsHM9xo4iw)
The recommended tile sizes are given upon the creation of the node based on the available VRAM.
Note
Enabling fast
for the decoder may produce images with slightly higher contrast and brightness.
Name | Description |
---|---|
tile_size |
The image is split into tiles, which are then padded with 11/32 pixels' in the decoder/encoder. |
fast |
|
color_fix |
Only estimate GroupNorm before downsampling, i.e., run in a semi-fast mode. Only for the encoder. Can restore colors if tiles are too small. |
The following images can be loaded in ComfyUI.
@article{jimenez2023mixtureofdiffusers,
title={Mixture of Diffusers for scene composition and high resolution image generation},
author={Álvaro Barbero Jiménez},
journal={arXiv preprint arXiv:2302.02412},
year={2023}
}
@article{bar2023multidiffusion,
title={MultiDiffusion: Fusing Diffusion Paths for Controlled Image Generation},
author={Bar-Tal, Omer and Yariv, Lior and Lipman, Yaron and Dekel, Tali},
journal={arXiv preprint arXiv:2302.08113},
year={2023}
}