LocalDiT is a lightweight Diffusion Transformer model for high-quality text-to-image generation that incorporates local attention mechanisms to improve computational efficiency while maintaining generation quality.
LocalDiT builds upon the architecture of
PixArt-α, introducing local attention mechanisms to reduce computational complexity and memory requirements. By processing image patches in local windows rather than with global attention, the model achieves faster inference and training while preserving image generation quality.
Details on code execution will be released at a later date.
1from model import LocalDiTPipeline
2import torch
3
4pipe = LocalDiTPipeline.from_pretrained("datagrid/LocalDiT-1024", torch_dtype=torch.float16)
5pipe = pipe.to("cuda")
6
7prompt = "A cute cat sitting on a windowsill, digital art"
8negative_prompt = "low quality, distorted, blurry"
9
10image = pipe(prompt, negative_prompt=negative_prompt, num_inference_steps=50).images[0]
11image.save("generated_image.png")
This model is released under the Apache 2.0 License.
Citation information will be provided at a later date.