Inspiration

The inspiration for this project was my own frustration and experience with AI image generation, as well as learning about environmental concerns.

What it does

Enchanted Diffusion is a full-stack web application that lets users generate AI images through a sustainable and collaborative process. Instead of immediately generating image after image (and wasting energy in the process), users work with an AI assistant to craft and refine vivid text prompts (significantly less energy-consuming). Once the user is happy with their idea, a final image is generated, saving energy and encouraging intentional creativity.

This is wrapped in a whimsical aesthetic: Cloud Fairycore, Ocean Mermaidia, Forest Goblin, and more—each with their own guided vocab to help users visualize and describe better

How I built it

I built Enchanted Diffusion on Replit, using a React frontend and an Express.js backend. I integrated two models from Hugging Face:

  • Stable Diffusion 3.5 (Large) for final image generation

  • Microsoft Phi-3 Mini 4K Instruct for generating and refining text prompts collaboratively

The workflow is designed to keep the user in the loop through multiple steps: idea generation → description refinement → image generation.

Challenges I ran into

Integrating the pipeline across frontend and backend was tricky—especially syncing the iterative text-gen feedback loop with final image generation but with several tries and deeper inspections of code, it was fixed.

It was challenging to integrate UI flow and backend routes, particularly in managing the multi-step design without breaking user experience but as can be observed in the demo video, the effort succeeded.

Accomplishments that I'm proud of

  1. Creating a fully working multi-model pipeline

  2. Designing a sustainability-first workflow that reduces energy usage by minimizing unnecessary image generations.

  3. Theming the experience into a magical design system that encourages fun, imagination and human-AI collaboration.

What I learned

  1. AI image generation is energy-intensive, so prompt engineering and natural language refinement are powerful and sustainable alternatives

  2. React and Express can powerfully coordinate multi-model pipelines when designed modularly.

  3. Small models like Phi-3 Mini can play a big role in creative ideation and human-AI dialogue when used creatively

What's next for Enchanted Diffusion

  1. Deployment on Vercel or Heroku

  2. More Creative Themes & Vocabulary Banks to expand the aesthetic palette

  3. Database Integration to support: User accounts, Tracking creative sessions and Potential future community or gallery feature

Built With

Share this project:

Updates