InvokeAI is a leading creative engine for Stable Diffusion models, empowering professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry leading WebUI, supports terminal use through a CLI, and serves as the foundation for multiple commercial products.
This PR exposes a tile_size field on ImageToLatentsInvocation and LatentsToImageInvocation.
Setting tile_size = 0 preserves the default behaviour.
This feature is primarily intended to support upscaling workflows that require VAE encoding/decoding high resolution images. In the future, we may want to expose the tile size as a global application config, but that's a separate conversation.
As a general rule, larger tile sizes produce better results at the cost of higher memory usage.
Example:
Original (5472x5472)
VAE roundtrip with 512x512 tiles (note the discoloration)
VAE roundtrip with 1024x1024 tiles (some discoloration still present, but less severe than at 512x512)
Related Issues / Discussions
Related: #6144
QA Instructions
[x] Test image generation via the Linear tab
[x] Test VAE roundtrip with tiling disabled
[x] Test VAE roundtrip with tiling and tile_size = 0
[x] Test VAE roundtrip with tiling and tile_size > 0
Merge Plan
No special instructions.
Checklist
[x] The PR has a short but descriptive title, suitable for a changelog
Summary
tile_size
field onImageToLatentsInvocation
andLatentsToImageInvocation
.tile_size = 0
preserves the default behaviour.Example:
Original (5472x5472)![orig](https://github.com/invoke-ai/InvokeAI/assets/14897797/af0a975d-11ed-4f3c-9e53-84f3da6c997e)
VAE roundtrip with 512x512 tiles (note the discoloration)![vae_roundtrip_512x512](https://github.com/invoke-ai/InvokeAI/assets/14897797/d589ae3e-fe93-410a-904c-f61f0fc0f1f2)
VAE roundtrip with 1024x1024 tiles (some discoloration still present, but less severe than at 512x512)![vae_roundtrip_1024x1024](https://github.com/invoke-ai/InvokeAI/assets/14897797/d0bb9752-3bfa-444f-88c9-39a3ca89c748)
Related Issues / Discussions
Related: #6144
QA Instructions
Merge Plan
No special instructions.
Checklist