How to install NVlabs/Sana. Official installation instructions. Project installation guide. Framework or library installation. Build installation instructions. How to setup and install from GitHub. Installation steps and setup instructions. Official docs and installation instructions GitHub.
NVlabs/Sana Installation Guide
How to install NVlabs/Sana. Official project installation instructions and setup guide.
⚡
Automated Install (Recommended)
Quick installation instructions for NVlabs/Sana. This is the fastest way to complete project installation and setup.
Install via curl
curl -fsSL https://hexmos.com/ipm-install | bash &&
ipm i NVlabs/Sanaor
Install via npx
npx @hexmos/ipm i NVlabs/SanaManual Installation Methods
Manual installation instructions. How to install from GitHub source.
Clone Repository and Set Up Environment
git clone https://github.com/NVlabs/Sana.git
cd Sana
./environment_setup.sh sanaInference with Hugging Face Diffusers
pip install diffusers transformers accelerate
python -c "import torch; from diffusers import SanaPipeline; pipe = SanaPipeline.from_pretrained('Efficient-Large-Model/SANA1.5_1.6B_1024px_diffusers', torch_dtype=torch.bfloat16).to('cuda'); pipe.vae.to(torch.bfloat16); pipe.text_encoder.to(torch.bfloat16); prompt = 'a cyberpunk cat with a neon sign that says \"Sana\
un"image = pipe(prompt=prompt, height=1024, width=1024, guidance_scale=4.5, num_inference_steps=20, generator=torch.Generator(device=\"cuda\").manual_seed(42))[0]; image[0].save('sana.png')"