azis1 / README.md
gotha1312's picture
Upload folder using huggingface_hub
d2560ea verified
---
license: apache-2.0
base_model: Qwen/Qwen-Image
library_name: diffusers
pipeline_tag: text-to-image
tags:
- lora
- qwen-image
- text-to-image
- diffusers
- safetensors
inference: false
---
# Azis1 LoRA for Qwen-Image
A LoRA (Low-Rank Adaptation) model trained on the Qwen-Image base model for generating images of a specific person.
## Model Details
| Property | Value |
|----------|-------|
| **Base Model** | [Qwen/Qwen-Image](https://huggingface.co/Qwen/Qwen-Image) |
| **LoRA Rank** | 64 |
| **LoRA Alpha** | 64 |
| **Training Resolution** | 512x512 |
| **Training Epochs** | 5 |
| **Training Images** | ~2400 |
| **Trigger Word** | `azis1` |
## Usage
### Trigger Word
Always include `azis1` at the beginning of your prompt for best results.
### With Diffusers (Python)
```python
import torch
from diffusers import DiffusionPipeline
# Load base model
pipe = DiffusionPipeline.from_pretrained(
"Qwen/Qwen-Image",
torch_dtype=torch.bfloat16,
)
pipe.enable_model_cpu_offload()
# Load LoRA
pipe.load_lora_weights("YOUR_USERNAME/azis1-qwen-lora")
# Generate
image = pipe(
prompt="azis1, portrait of a man, professional photography, studio lighting",
num_inference_steps=50,
guidance_scale=4.0,
height=1024,
width=1024,
).images[0]
image.save("output.png")
```
### With ComfyUI
1. Download the `.safetensors` file to `ComfyUI/models/loras/`
2. Use this node setup:
- **UNETLoader** → `qwen_image_fp8_e4m3fn.safetensors`
- **LoraLoaderModelOnly** → `azis1.safetensors` (strength: 0.85)
- **CLIPLoader** → `qwen_2.5_vl_7b_fp8_scaled.safetensors`
- **VAELoader** → `qwen_image_vae.safetensors`
3. Recommended settings:
- Steps: 50
- CFG Scale: 4.0
- Sampler: Euler
## Example Prompts
```
azis1, portrait of a man, professional photography, studio lighting, high quality, 4K
azis1, man in casual clothes, outdoor, natural lighting
azis1, close-up portrait, dramatic lighting, artistic
azis1, man with beard, formal attire, corporate headshot
```
## Training Details
- **Framework**: OneTrainer
- **Optimizer**: AdamW 8-bit
- **Learning Rate**: 0.0001 (Cosine schedule)
- **Batch Size**: 2 (with gradient accumulation of 2)
- **Precision**: bfloat16
- **Hardware**: NVIDIA RTX 5090 (32GB VRAM)
## Limitations
- This LoRA only works with **Qwen-Image** base model
- It will NOT work with Stable Diffusion 1.5, SDXL, or Flux models
- Best results at 512x512 to 1024x1024 resolution
## License
Apache 2.0 - Same as the base Qwen-Image model.
## Acknowledgments
- [Qwen-Image](https://huggingface.co/Qwen/Qwen-Image) by Alibaba
- [OneTrainer](https://github.com/Nerogar/OneTrainer) for training