Instructions to use nebulette/efficient-unet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use nebulette/efficient-unet with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("nebulette/efficient-unet", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Efficient UNet
Removed the self-attention layers at high-resolution stages.
Replaced the Conv2d layers with DepthwiseConv modules.
Gaussian noise was replaced by sinusoidal position embeddings.
Mage-VAE
Adopted the 12ch variant of Mage-VAE.
You may need to train the VAE for one more epoch with variable aspect ratios for large images.
Text Encoder
The LFM2.5 encoder was used for those anime text sequences.
The comma-separated keywords were shuffled in each epoch.
Data augmentation
In the initial epochs, the model was exposed to larger image samples, which were augmented by image cropping.
The optional padding/border around the images was not included in the loss calculation.
The learning rate was set to 1e-5 during the warmup phase.
The timesteps were chosen by the logit-normal sampling.
Source data
- anime_faces_v2
- gelbooru_2026 (portraits)
References
- 2412.09619
- 2603.28713v1
- 2606.03715
- Downloads last month
- -