System Architecture

Campus-AI

by CounciL

End-to-end AI pipeline that scrapes, curates, trains, and generates campus event posters

01
Data Pipeline
Collect → Filter → Caption → Split
🕷️
Pinterest Scraper
Selenium headless browser with automatic scrolling & perceptual hash deduplication
57 subcategories × 1,900
🔬
Quality Filter
GPU-accelerated Laplacian sharpness, resolution, aspect ratio & color diversity checks
~68% pass rate
📝
Florence-2 Captioner
Microsoft Florence-2-large generates detailed captions in bf16 with torch.compile
SM120 optimized
✂️
Dataset Splitter
Stratified splitting by category into training, validation & test sets
~55K train images
02
Training Pipeline
Fine-tune Flux.1-dev with LoRA adapters
Prodigy Optimizer
Self-adapting LR = 1.0
No manual LR tuning needed
📉 Min-SNR-γ Loss
γ = 5.0 — balanced learning
across all noise levels
🔄 Cosine Warm Restarts
3 cycles over 4 epochs
escapes local minima
🧠
Flux.1-dev
12 billion parameter
transformer diffusion model
+ LoRA Adapter (Rank 16, α=16)
40M
Trainable Params
bf16
Precision
4
Eff. Batch Size
~55K
Optimizer Steps
🛡️ Anti-Overfitting
Caption dropout 10%
LoRA dropout 8%
L2 weight decay 0.01
⚙️ LoRA+ (ICML '24)
B matrix gets 16× higher LR
Free +2% accuracy boost
🖥️ SM120 Blackwell
TF32 tensor cores
torch.compile max-autotune
03
Inference & Deployment
Prompt → Generate → Upscale → Deliver
👤
User Input
Event description, type, visual style & resolution preset
🦙
Groq Llama 3.3 70B
Enhances plain text into detailed Flux-optimized prompts
~200ms API
Flux.1-dev + LoRA Inference Engine
✍️
Text → Poster
From description only
🖼️
Reference Style
IP-Adapter transfer
🔄
Image → Image
Transform existing art
🎭
Inpainting
Edit specific regions
🔎
Real-ESRGAN 2×
AI upscaling for crisp HD output at any size
🎨
Generated Poster
1024×1024 to 1152×768
Multiple variants supported
🖥️ Local — RTX 5070 Ti (12GB VRAM)
☁️ Cloud — HF Spaces + ZeroGPU
71K+
Training Images
57
Subcategories
12B
Base Params
40M
LoRA Params
SM120
GPU Arch
~46h
Training Time