HiDiffusion: Unlocking Higher-Resolution Creativity and Efficiency in Pretrained Diffusion Models

Abstract

Diffusion models have become a mainstream approach for high-resolution image synthesis. However, directly generating higher-resolution images from pretrained diffusion models will encounter unreasonable object duplication and exponentially increase the generation time. In this paper, we discover that object duplication arises from feature duplication in the deep blocks of the U-Net. Concurrently, We pinpoint the extended generation times to self-attention redundancy in U-Net’s top blocks. To address these issues, we propose a tuning-free higher-resolution framework named HiDiffusion. Specifically, HiDiffusion contains Resolution-Aware U-Net~(RAU-Net) that dynamically adjusts the feature map size to resolve object duplication and engages Modified Shifted Window Multi-head Self-Attention(MSW-MSA) that utilizes optimized window attention to reduce computations. we can integrate HiDiffusion into various pretrained diffusion models to scale image generation resolutions even to 4096×4096 at 1.5-6× the inference speed of previous methods. Extensive experiments demonstrate that our approach can address object duplication and heavy computation issues, achieving state-of-the-art performance on higher-resolution image synthesis tasks.

Paper: arxiv.org/abs/2311.17528

Code: github.com/megvii-model/HiDiffusion

Colab Demo: …google.com/…/1EiBn9lSnPZTU4cikRRaBBexs429M-qty?u…

Project Page: hidiffusion.github.io

https://i.imgur.com/iYVTBw8.png

https://i.imgur.com/kxSPI5V.png

https://i.imgur.com/ccFTMWg.png

wewbull,

Does this mean, that because you’re now liberated from the dimensions of the training data, that all training data will apply to all sizes? e.g. generated portrait images will be influenced by landscape training data.

calabast,

Very cool! I only have experience using automatic1111, so if anyone has any hints on how I could enable this using that tool, I’d love to try it out!

Even_Adder,

I think someone will have to implement it as an extension.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • stable_diffusion@lemmy.dbzer0.com
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • ngwrru68w68
  • tacticalgear
  • magazineikmin
  • Youngstown
  • khanakhh
  • rosin
  • slotface
  • InstantRegret
  • everett
  • kavyap
  • cubers
  • megavids
  • GTA5RPClips
  • cisconetworking
  • modclub
  • ethstaker
  • osvaldo12
  • Durango
  • normalnudes
  • tester
  • provamag3
  • Leos
  • anitta
  • JUstTest
  • lostlight
  • All magazines