Run this model with HF Jobs
Run ishan24/Sana_600M_1024px_ControlNet_diffusers on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/ishan24/Sana_600M_1024px_ControlNet_diffusers. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/ishan24/Sana_600M_1024px_ControlNet_diffusers on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use ishan24/Sana_600M_1024px_ControlNet_diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ishan24/Sana_600M_1024px_ControlNet_diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ishan24/Sana_600M_1024px_ControlNet_diffusers", 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
- Local Apps Settings
- Draw Things
- DiffusionBee
Update README.md
Browse files123---license: mit---12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364---tags:- SanaControlNetPipelinepipeline_tag: text-to-imagelicense: mit---<p align="center" style="border-radius: 10px"><img src="https://raw.githubusercontent.com/NVlabs/Sana/refs/heads/main/asset/logo.png" width="35%" alt="logo"/></p><div style="display:flex;justify-content: center"><a href="https://huggingface.co/collections/Efficient-Large-Model/sana-673efba2a57ed99843f11f9e"><img src="https://img.shields.io/static/v1?label=Demo&message=Huggingface&color=yellow"></a>  <a href="https://github.com/NVlabs/Sana"><img src="https://img.shields.io/static/v1?label=Code&message=Github&color=blue&logo=github"></a>  <a href="https://nvlabs.github.io/Sana/"><img src="https://img.shields.io/static/v1?label=Project&message=Github&color=blue&logo=github-pages"></a>  <a href="https://hanlab.mit.edu/projects/sana/"><img src="https://img.shields.io/static/v1?label=Page&message=MIT&color=darkred&logo=github-pages"></a>  <a href="https://arxiv.org/abs/2410.10629"><img src="https://img.shields.io/static/v1?label=Arxiv&message=Sana&color=red&logo=arxiv"></a>  <a href="https://nv-sana.mit.edu/"><img src="https://img.shields.io/static/v1?label=Demo&message=MIT&color=yellow"></a>  <a href="https://discord.gg/rde6eaE5Ta"><img src="https://img.shields.io/static/v1?label=Discuss&message=Discord&color=purple&logo=discord"></a>  </div># Model cardWe introduce **Sana**, a text-to-image framework that can efficiently generate images up to 4096 × 4096 resolution.Sana can synthesize high-resolution, high-quality images with strong text-image alignment at a remarkably fast speed, deployable on laptop GPU.Source code is available at https://github.com/NVlabs/Sana.### 🧨 Diffusers### 1. How to use `SanaControlNetPipeline` with `🧨diffusers````python# run `pip install git+https://github.com/huggingface/diffusers` before use Sana in diffusersimport torchfrom diffusers import SanaControlNetModel, SanaControlNetPipelinefrom diffusers.utils import load_imagecontrolnet = SanaControlNetModel.from_pretrained("ishan24/Sana_600M_1024px_ControlNet_diffusers",torch_dtype=torch.float16)pipe = SanaControlNetPipeline.from_pretrained("Efficient-Large-Model/Sana_600M_1024px_diffusers",variant="fp16",controlnet=controlnet,torch_dtype=torch.float16,)pipe.to('cuda')pipe.vae.to(torch.bfloat16)pipe.text_encoder.to(torch.bfloat16)cond_image = load_image("https://huggingface.co/ishan24/Sana_600M_1024px_ControlNet_diffusers/resolve/main/hed_example.png")prompt='a cat with a neon sign that says "Sana"'image = pipe(prompt,control_image=cond_image,).images[0]image.save("sana.png")```
README.md+64-3