Skip to content

strands-sana

NVIDIA Sana inference + training as Strands Agent tools.
33 tools · 15 models · 7 pipelines · MP4 video · LoRA · ControlNet · Sol-RL.

Sana 1.5 1.6B Sana-Sprint 1.6B

Sana-1.5 1.6B (20 steps) vs Sana-Sprint 1.6B (2 steps) — same prompt, same seed.
"a majestic rubber duck wearing aviator goggles, perched on a futuristic motorcycle in a cyberpunk neon-lit city, raining"

Sunrise Cyberpunk

sana_video_generate — 5s sunrise · 2s cyberpunk teaser, 480p, generated on NVIDIA Thor


Why strands-sana?

pip install strands-sana
from strands import Agent
from strands_sana import sana_generate, sana_video_generate

agent = Agent(tools=[sana_generate, sana_video_generate])
agent("Generate a cyberpunk cityscape at 1024px, then animate it as a 5s clip")

That's it. The agent picks the right model, sets sane defaults, downloads weights on first use, and saves outputs. All 33 tools work the same way.


How it fits together

graph LR
    User([🗣️ Agent prompt]) --> Tools

    subgraph Tools[" 33 @tool functions "]
        T2I["🖼️ sana_generate<br/>sana_sprint_generate<br/>sana_inpaint<br/>sana_controlnet_generate"]
        IMG["🎨 sana_img2img"]
        VID["🎬 sana_video_generate<br/>sana_image_to_video"]
        TRAIN["🎓 sana_train_lora<br/>sana_train_solrl<br/>sana_train_video<br/>+4 more"]
        EXTRAS["⚙️ schedulers · quant · LoRA<br/>metrics · ComfyUI export<br/>HF upload · prefetch"]
    end

    Tools --> Wrapper["SanaPipelineWrapper<br/>(7 pipeline kinds)"]
    Wrapper --> Diffusers["🧨 diffusers ≥ 0.32"]
    Wrapper --> Upstream["📚 NVlabs/Sana<br/>(training scripts)"]
    Diffusers --> GPU([⚡ CUDA / MPS / CPU])

    style Tools fill:#5e35b1,stroke:#333,color:#fff
    style Wrapper fill:#7e57c2,stroke:#333,color:#fff
    style Diffusers fill:#ec407a,stroke:#333,color:#fff

Inference path uses diffusers directly — fast, well-maintained, GPU-accelerated. Training path shells out to upstream NVlabs/Sana scripts (auto-discovered).


What you can do

  • 🖼️ Generate images

    Sana 1.0 / 1.5 / Sprint, plus PAG, Inpainting, ControlNet, multi-image batches.

    → Image generation

  • 🎬 Generate videos

    SANA-Video 480p / 720p / LongSANA. Text-to-video and image-to-video.

    → Video generation

  • ⚡ Sana-Sprint

    1-2 step distilled inference. ~0.1s per 1024px image on H100.

    → Sprint

  • 🎨 Image-to-image

    Restyle existing images at Sprint speed.

    → Img2Img

  • 🎓 Train your own

    LoRA, full pretrain, sCM-LADD distillation, Sol-RL post-training, video FSDP.

    → Training

  • 🔬 Inference scaling

    Generate K candidates, pick best by CLIP / NVILA.

    → Inference scaling

  • ⚙️ Memory modes

    Run 1.6B in 8 GB VRAM via int4/int8 quantization + offload.

    → Memory & quantization

  • 🔌 Schedulers

    10 alias (flow-match-euler, DPM-Solver, Euler, DDIM, …) — swap at runtime.

    → Schedulers

  • 📊 Metrics

    CLIPScore, ImageReward — score generations programmatically.

    → Metrics


Tested on real hardware

Tested on NVIDIA Thor Tests passing

11 bugs were caught and fixed by stress-testing every tool on an NVIDIA Thor dev kit (CUDA 13). See the full bug log.

→ Continue to Quickstart or browse the Gallery.