Inspiration
- Manual testing exhaustion: Testing image generation models manually requires endless prompt typing and human inspection.
- Lack of benchmarks: Developers need an automated way to measure how changes in code affect visual output, quality, and prompt adherence.
- Regression tracking: We wanted a dedicated "CI/CD tool" specifically tailored for generative AI to catch quality drops instantly.
What it does
- Automated prompt execution: Runs large batches of test prompts across multiple models simultaneously.
- Metric-based evaluation: Calculates CLIP scores, aesthetic scores, and structural similarity (SSIM) automatically.
- Web UI dashboard: Provides a clean interface to compare generated images side-by-side and track quality history.
- Failure alerting: Flags images that fall below performance thresholds or fail safety filters.
How we built it
- Backend engine: Built with Python and FastAPI to handle heavy asynchronous generation tasks.
- Model integration: Utilized Hugging Face Diffusers and popular APIs to connect Stable Diffusion and Flux models.
- Frontend dashboard: Developed a responsive Gradio/Streamlit Web UI for intuitive data visualization and image comparison.
- Database: Used SQLite to log prompt configurations, generation metadata, and evaluation metrics.
Challenges we ran into
- GPU memory management: Running concurrent automated tests often triggered Out-Of-Memory (OOM) errors, requiring a strict queue system.
- Subjective quality metrics: Quantifying "beauty" or "accuracy" mathematically is difficult, forcing us to combine multiple score types.
- Frontend rendering lag: Loading hundreds of high-resolution images in the Web UI initially caused massive performance slowdowns.
Accomplishments that we're proud of
- Successful pipeline: Created a fully functional pipeline that reduces model testing time from hours to a single click.
- Dynamic comparisons: Built a seamless side-by-side image comparison tool that updates metrics in real-time.
- Robust queue system: Solved GPU crashes by implementing a stable task scheduling mechanism.
What we learned
- GenAI optimization: Gained deep knowledge about model quantization, caching, and efficient image generation pipelines.
- UI/UX for data: Realized that displaying machine learning metrics alongside visual data requires clean, uncluttered interface design.
- Standardization need: Learned how critical standardized benchmarking is for continuous deployment in generative AI.
What's next for image_harness_with_webui
- LLM-as-a-Judge: Integrate vision-language models (like LLaVA) to provide detailed text-based critiques of images.
- Cloud scaling: Add Docker support and cloud execution to run massive test suites across multiple distributed GPUs.
- Real-time drift detection: Monitor production models to alert developers when real-world user prompts start degrading.
Built With
- gpt-image-2
- openai
- python
Log in or sign up for Devpost to join the conversation.