图像生成Apache-2.0Python

Sana

NVIDIA’s efficient high-resolution text-to-image model (up to 4K).

Star 数
9.9K
Fork 数
816
未关闭 Issue
136
最近提交
2026-11-30

数据来自 GitHub API · 更新于 2026-11-30

Sana 是什么?

Sana is a linear-diffusion-transformer text-to-image model from NVIDIA and MIT that generates up to 4096×4096 images quickly, even on laptop GPUs. Code includes training, inference, a Gradio demo and Diffusers support.

主要功能

  • Up to 4K resolution output
  • Linear attention for speed
  • Small models (0.6B/1.6B)
  • Diffusers and ComfyUI support

系统要求

平台
Linux · Windows
显卡
NVIDIA
显存
~9 GB+ (lower with quantization)

如何安装 Sana

根据项目 README 整理。开源项目更新很快,请以 GitHub 页面上的最新说明为准。

Diffusers

  1. 1
    Install Diffusers and PyTorch.
    pip install -U diffusers transformers accelerate
  2. 2
    Generate with SanaPipeline.
    from diffusers import SanaPipeline
    import torch
    pipe = SanaPipeline.from_pretrained("Efficient-Large-Model/Sana_1600M_1024px_diffusers", torch_dtype=torch.float16).to("cuda")
    pipe("a cyberpunk cat").images[0].save("sana.png")

优势

  • Fast high-resolution generation
  • Small model size

不足

  • Smaller ecosystem than SDXL/Flux

Sana 替代品对比

软件Star 数许可证平台显存
Sana

NVIDIA’s efficient high-resolution text-to-image model (up to 4K).

9.9KApache-2.0~9 GB+ (lower with quantization)
FLUX (reference code)

Official inference code for Black Forest Labs’ FLUX models.

26.1KApache-2.016–24 GB for full precision; less with quantized variants elsewhere
Diffusers

Hugging Face’s Python library for diffusion models.

35KApache-2.0—
ComfyUI

Node-based interface for diffusion models — images, video and audio.

149.3KGPL-3.04 GB minimum for SD1.5; 12 GB+ recommended for FLUX and video models
Stable Diffusion WebUI (AUTOMATIC1111)

The classic browser UI for Stable Diffusion with a massive extension ecosystem.

165.4KAGPL-3.04 GB minimum (with --medvram/--lowvram), 8 GB+ recommended
Stable Diffusion WebUI Forge

A faster, leaner fork of the A1111 WebUI with FLUX support.

13.2KAGPL-3.06 GB+ (FLUX NF4/GGUF variants run on 6–8 GB)

常见问题

Sana 免费吗?

是的——Sana 是开源软件,采用 Apache-2.0 许可证。商用前请确认软件及模型权重的许可条款。

Sana 支持 Windows、Mac 和 Linux 吗?

Sana 支持:Linux, Windows。

运行 Sana 需要什么配置?

NVIDIA. VRAM: ~9 GB+ (lower with quantization)

如何安装 Sana?

1. Install Diffusers and PyTorch. 2. Generate with SanaPipeline.

Sana 有哪些好的替代品?

常见替代品包括 FLUX (reference code), Diffusers, ComfyUI, Stable Diffusion WebUI (AUTOMATIC1111),详见本页对比表。

可以不安装、在线使用 Sana 吗?

如果只想要结果,AiLoft 可在浏览器中运行 GPT Image 2.5、Nano Banana Pro 等顶级图像模型,无需显卡和配置。

不想安装?直接在浏览器里生成图片

无需显卡、驱动或 Python。在线使用 GPT Image 2.5 和 Nano Banana Pro,并排对比效果。