Instructions to use lukh/trained-sana-lora-cg with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use lukh/trained-sana-lora-cg with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Efficient-Large-Model/Sana_1600M_1024px_BF16_diffusers", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("lukh/trained-sana-lora-cg") prompt = "A photo of chen guan reading a newspaper" image = pipe(prompt).images[0] - Sana
How to use lukh/trained-sana-lora-cg with Sana:
# Load the model and infer image from text import torch from app.sana_pipeline import SanaPipeline from torchvision.utils import save_image sana = SanaPipeline("configs/sana_config/1024ms/Sana_1600M_img1024.yaml") sana.from_pretrained("hf://lukh/trained-sana-lora-cg") image = sana( prompt='a cyberpunk cat with a neon sign that says "Sana"', height=1024, width=1024, guidance_scale=5.0, pag_guidance_scale=2.0, num_inference_steps=18, ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
Welcome to the community
The community tab is the place to discuss and collaborate with the HF community!