ComfyUI Extension: ComfyUI Sana Custom Node
A custom node for ComfyUI that supports Sana text-to-image models (600M/1.6B parameters) with advanced features including LoRA support, PAG (Perturbed-Attention Guidance), and optimized VRAM usage.
Custom Nodes (0)
README
ComfyUI Sana Custom Node
Support my GPU rental fee for Finetune & Request the desired model
https://coff.ee/kpsss34
A custom node for ComfyUI that supports Sana text-to-image models (600M/1.6B parameters) with advanced features including LoRA support, PAG (Perturbed-Attention Guidance), and optimized VRAM usage.
Installation
-
Clone to ComfyUI custom nodes directory:
cd ComfyUI/custom_nodes/ git clone https://github.com/kpsss34/ComfyUI-kpsss34-Sana.git cd ComfyUI-kpsss34-Sana
-
Install dependencies:
pip install -r requirements.txt
-
Create model directories:
mkdir -p ComfyUI/models/sana mkdir -p ComfyUI/models/loras/sana
Model Setup
Download Sana Models
- Download Sana models from Hugging Face:
1.1 How to donwload
Ex.repo [kpsss34/SANA600.fp8_illustrious_SFW_V1]
in root/ComfyUI/models/sana
- git clone https://huggingface.co/kpsss34/SANA600.fp8_illustrious_SFW_V1
- Place model folders in
ComfyUI/models/sana/
:ComfyUI/models/sana/ ├── SANA600.fp8_illustrious_SFW_V1/ │ ├── text_encoder/ │ ├── transformer/ │ ├── vae/ │ └── ... └── SANA600.fp8_illustrious_SFW_V2/ ├── text_encoder/ ├── transformer/ ├── vae/ └── ...
LoRA Setup (Optional)
Place LoRA files in ComfyUI/models/loras/sana/
:
ComfyUI/models/loras/sana/
├── my_lora_1/
│ ├── pytorch_lora_weights.safetensors
│ └── adapter_config.json
└── my_lora_2/
├── pytorch_lora_weights.safetensors
└── adapter_config.json
Usage
The node package provides three main components:
1. Sana Model Loader
- Purpose: Load and configure Sana models
- Options:
model_name
: Select from available Sana modelsvram_mode
: Choose "low" (2-4GB) or "high" (12GB+)use_pag
: Enable Perturbed-Attention Guidancetorch_compile
: Enable model compilation for performance
2. Sana LoRA Loader
- Purpose: Apply LoRA weights to loaded models
- Options:
lora_name
: Select LoRA or "None"lora_scale
: Adjust LoRA influence (0.0-2.0) Note: Cannot be used with PAG simultaneously
3. Sana Sampler
- Purpose: Generate images using the configured model
- Options:
prompt
: Text description for generationnegative_prompt
: What to avoid in generationwidth/height
: Image dimensions (512px-2048px)guidance_scale
: Prompt adherence strength (3.0-7.0)pag_scale
: PAG strength (0.0-10.0, only with PAG enabled) Note:Cannot be used PAG with LoRAnum_inference_steps
: Generation steps (1-100)seed
: Random seed (-1 for random)