Stable Diffusion LoRA: Nigerian Adire Style
Model Description
This is a LoRA (Low-Rank Adaptation) model fine-tuned on traditional Nigerian adire textile patterns. It teaches Stable Diffusion 1.5 to generate images in the distinctive adire style—characterized by intricate geometric patterns, indigo blue coloring, and traditional Yoruba design elements.
Trigger phrase: nigerian_adire_style
Key Features
- Generates authentic adire-style patterns
- Lightweight: 50MB (vs 7GB full model)
- Fast inference: ~12 seconds per image
- Compatible with standard SD 1.5 workflows
- Built with production MLOps pipeline
Usage
Quick Start
from diffusers import StableDiffusionPipeline
import torch
# Load base model
pipe = StableDiffusionPipeline.from_pretrained(
"runwayml/stable-diffusion-v1-5",
torch_dtype=torch.float16
)
# Load LoRA weights
pipe.unet.load_attn_procs("AfroLogicInsect/sd-lora-nigerian-adire")
pipe = pipe.to("cuda")
# Generate
prompt = "a nigerian_adire_style painting of a sunset over Lagos"
image = pipe(prompt, num_inference_steps=50, guidance_scale=7.5).images[0]
image.save("output.png")
Advanced Usage
# With custom parameters
image = pipe(
prompt="a nigerian_adire_style portrait with geometric patterns",
negative_prompt="blurry, low quality, distorted",
num_inference_steps=75,
guidance_scale=9.0,
height=512,
width=512,
generator=torch.manual_seed(42)
).images[0]
With Diffusers Pipeline
from diffusers import DiffusionPipeline
pipe = DiffusionPipeline.from_pretrained(
"runwayml/stable-diffusion-v1-5",
torch_dtype=torch.float16
)
pipe.unet.load_attn_procs("AfroLogicInsect/sd-lora-nigerian-adire")
pipe.to("cuda")
Training Details
Training Data
- Dataset: 30 high-quality images of traditional Nigerian adire patterns
- Resolution: 512×512 pixels
- Source: Curated collection of authentic adire textiles
- Preprocessing: Center-cropped and resized
Training Configuration
Base Model: runwayml/stable-diffusion-v1-5
Method: LoRA (Low-Rank Adaptation)
Rank: 4
Alpha: 4
Hyperparameters:
Learning Rate: 1e-4
Scheduler: constant
Training Steps: 800
Batch Size: 1
Gradient Accumulation: 4
Optimizer: AdamW (8-bit)
Mixed Precision: fp16
Hardware:
GPU: Tesla T4 (Google Colab)
VRAM: 15GB
Training Time: ~75 minutes
Training Process
The model was trained using DreamBooth with LoRA adapters:
- Fine-tuning: Only attention layers were adapted (0.11% of total parameters)
- Validation: Generated samples every 100 steps
- Loss: Final loss converged to 0.042
- Quality: CLIP score of 0.85 on validation set
MLOps Pipeline
This model was built with a complete production pipeline:
- Automated evaluation: Quality, speed, reliability checks
- Quality gates: Only promoted after passing thresholds
- Version control: Tracked with MLflow
- CI/CD: Automated testing and deployment
- Monitoring: Real-time inference tracking
Model Performance
Evaluation Metrics
| Metric | Value | Threshold |
|---|---|---|
| CLIP Score | 0.85 | > 0.75 ✓ |
| Generation Time | 12.3s | < 30s ✓ |
| Success Rate | 100% | > 95% ✓ |
| Quality (Human) | 4.6/5 | N/A |
Benchmark (on Tesla T4)
Resolution: 512×512 Steps: 50 Guidance: 7.5 Average Time: 12.3s P95 Latency: 14.1s Throughput: ~5 images/minute
Prompt Engineering Tips
Best Practices
# ✓ Good prompts (specific, descriptive)
"a nigerian_adire_style painting of Lagos cityscape at golden hour"
"a nigerian_adire_style portrait of a woman with geometric patterns"
"a nigerian_adire_style pattern featuring indigo and white colors"
# ✗ Poor prompts (too vague)
"adire style image"
"nigerian art"
"blue pattern"
Recommended Settings
num_inference_steps = 50-75 # Higher = better quality
guidance_scale = 7.5-9.0 # Higher = stronger style adherence
negative_prompt = "blurry, low quality, distorted, western style"
Advanced Techniques
Style Mixing:
prompt = "a nigerian_adire_style painting with Art Nouveau influences"
Subject Focus:
prompt = "a nigerian_adire_style portrait of [subject], detailed geometric patterns"
Limitations & Biases
Known Limitations
- Style Consistency: May occasionally generate generic patterns instead of authentic adire
- Color Range: Heavily biased toward indigo/blue (true to training data)
- Resolution: Optimized for 512×512; higher resolutions may show artifacts
- Text Rendering: Cannot generate readable text in adire style
Ethical Considerations
- Cultural Sensitivity: This model represents traditional Nigerian art. Use respectfully.
- Attribution: Generated images should not be misrepresented as authentic adire.
- Commercial Use: Review the CreativeML Open RAIL-M license for commercial applications.
Bias Statement
The model reflects the patterns present in the training data—traditional adire designs from specific Nigerian communities. It may not represent all regional variations or modern interpretations of adire art.
License
This model is released under the CreativeML Open RAIL-M license.
Key Points:
- You can use this model for personal and commercial purposes
- You can modify and redistribute the model
- You can NOT use it for illegal purposes
- You can NOT claim you created the base Stable Diffusion model
Citation
If you use this model in your research or project, please cite:
@misc{nigerian-adire-lora-2025,
author = {Akan Daniel},
title = {Stable Diffusion LoRA: Nigerian Adire Style},
year = {2025},
publisher = {HuggingFace},
journal = {HuggingFace Model Hub},
howpublished = {\url{https://huggingface.co/AfroLogicInsect/sd-lora-nigerian-adire}}
}
Blog Series:
@article{mlops-blog-series-2025,
author = {Akan Daniel},
title = {Building Production AI: A Three-Part MLOps Journey},
year = {2025},
url = {https://dev.to/afrologicinsect/building-production-ai-a-three-part-mlops-journey-38a8}
}
Resources
Related Links
Technical Documentation
Community
- Report issues: GitHub Issues
- Discussions: HuggingFace Discussions
Examples
Example 1: Sunset Scene
Prompt: a nigerian_adire_style painting of Lagos cityscape at sunset
Example 2: Portrait
Prompt: a nigerian_adire_style portrait of a woman wearing traditional attire
Example 3: Pattern
Prompt: a nigerian_adire_style pattern with indigo geometric shapes
Acknowledgments
- Base Model: Stable Diffusion 1.5 by RunwayML
- Training Method: LoRA by Microsoft Research
- Infrastructure: Google Colab, HuggingFace Hub
- Cultural Heritage: Traditional Nigerian adire artisans
Version History
v1.0.0 (2025-01-XX)
- Initial release
- Trained on 30 adire pattern images
- 800 training steps
- CLIP score: 0.85
- Downloads last month
- 5
Model tree for AfroLogicInsect/sd-lora-nigerian-adire
Base model
runwayml/stable-diffusion-v1-5