HomePortfolio
Ai Photocraft
website

Ai Photocraft

AI Photocraft is an innovative online platform designed to transform ordinary

Agency

Nep Tech Pal

Category

website

Type

website

Status

published

Ai Photocraft

Key Features

Discover the powerful features that make this project stand out.

Free ai enhancer

Free AI Enhancer automatically improves the quality of your images using AI. It sharpens details, enhances colors, and reduces noise, giving your photos a professional look in seconds—all without any cost.

AI Background Removal

One-click precise background removal using segmentation AI — no manual masking.

free text to image generator

Text-to-Image Generation is an AI-powered feature that transforms written text or prompts into visual images. Users simply describe what they want, and the system generates a corresponding image using deep learning models. This technology allows creating custom illustrations, concept art, or visual content quickly without needing advanced design skills.

Photo Restoration

Restore old, damaged, or low-quality photos to high resolution using diffusion models.

AI Colorization

Convert black-and-white photos to vibrant color with realistic AI colorization.

Portrait Retouching

Auto skin smoothing, teeth whitening, eye enhancement for professional results.

Batch Processing

Process up to 50 images simultaneously — ideal for photographers and agencies.

No-signup Free Tier

Users can try 5 free edits without creating an account, reducing friction.

From Challenge to Solution

Discover how we transformed challenges into innovative solutions.

The Challenge

The Challenge: Real-Time AI at Scale Without Breaking the Bank

AI image processing is computationally expensive. A single background removal request using a segmentation model like SAM or U2-Net can take 2–5 seconds on a CPU, and a photo restoration job using diffusion models can run for 20–60 seconds on a GPU instance. Building a web platform where users upload a photo and expect near-instant results — while keeping infrastructure costs sustainable — was the core engineering challenge.

Consider how Adobe Firefly handles this: they run on massive GPU clusters with enterprise-grade infrastructure and charge premium subscription prices. Building a similar experience for a startup meant we had to be far more clever about resource allocation, job queuing, and cost optimization.

The specific challenges we faced:

  • Cold-start latency: Spinning up a GPU worker for the first job after idle time adds 30–60 seconds of delay — unacceptable for a web app.
  • GPU cost management: Running GPU instances 24/7 is prohibitively expensive. Idle time must be minimized through smart auto-scaling.
  • Queue fairness: Free-tier users uploading 5 photos shouldn't block paid users who paid for batch processing of 50 images.
  • Model diversity: Background removal, restoration, and colorization each require different AI models — managing multiple model weights in memory adds complexity.
  • Real-time progress feedback: Users who upload a photo and see nothing for 30 seconds will assume it's broken and leave. Progress feedback is critical for retention.
  • File security: Users upload personal photos — some sensitive. Storage must be ephemeral with automatic deletion and no cross-user data access.

We also had to solve the UX problem: how do you make a complex multi-step AI process feel simple and magical to someone who has never used AI tools before?

Our Solution

Solution: Async AI Pipeline with Smart Queue Management

We architected the platform around an async job pipeline — a pattern used by companies like Midjourney and Stability AI to handle millions of AI generation requests without overwhelming their GPU clusters.

1. Tiered Job Queue with Celery + Redis

Every image processing request is dispatched to a Celery task queue backed by Redis. We implemented three priority tiers: fast lane (background removal — CPU-capable, under 5s), standard lane (colorization, retouching — GPU, 10–20s), and heavy lane (restoration, batch jobs — full GPU, 30–60s). Paid users get priority routing into fast and standard lanes. Free-tier users share the standard lane during off-peak hours. This tiered approach is similar to how AWS SQS implements message priority and how airlines separate boarding lanes — it keeps the experience smooth for paying customers while still delivering value to free users.

2. Auto-Scaling GPU Workers on AWS

We use AWS EC2 spot instances for GPU workers, configured to scale up when queue depth exceeds a threshold and scale down after 5 minutes of idle. To solve the cold-start problem, we keep one warm GPU instance running at all times and scale from there. This reduces average cold-start latency from 45 seconds to under 3 seconds for the first job — a 15x improvement that dramatically changes the user experience. Spot instances reduce GPU costs by 60–70% compared to on-demand pricing.

3. Real-Time WebSocket Progress Updates

Instead of leaving users staring at a spinner, the frontend connects to a WebSocket channel (via Django Channels) tied to their job ID. As the AI pipeline progresses — upload received, queued, processing started, 50% complete, done — the frontend receives real-time status events and updates a progress bar and status message. This technique mirrors how Midjourney's Discord bot shows live image generation progress, transforming a potentially frustrating wait into an engaging visual experience.

4. Pre-Loaded Model Weights with Smart Caching

Each GPU worker pre-loads the most frequently used model weights into VRAM on startup — background removal (SAM), colorization (DeOldify), and portrait enhancement models. Less-used models (video restoration, batch upscaling) are lazy-loaded on first request and kept warm for 10 minutes. This eliminates per-request model loading time, reducing average processing latency by 40%.

5. Zero-Trust File Security

Uploaded photos are stored in isolated S3 buckets with user-scoped IAM policies and automatically deleted after 24 hours. Temporary pre-signed S3 URLs give users download access for 6 hours — after which files are gone. No cross-user data access is architecturally possible. This privacy-first approach builds the trust needed for users to upload personal or sensitive photos.

Project Gallery

Visual showcase of the project in action.

dffdf

Technology Stack

The powerful technologies used to bring this project to life.

FastAPI

Backend

Python

Backend

PyTorch

Backend

PostgreSQL

Database

Redis

DevOps

Next.js

Frontend

Next Js

Frontend

Tailwind CSS

Frontend

AWS S3

Storage

Interested in working with us on your next project?

Ready to get Started?

Talk to us

Quotation Form