- ๐ผ๏ธ Upload any photo โ portraits, selfies, group shots
- ๐จ 12 unique art styles โ Disney, Anime, Ghibli, Arcane, Pixar, Comic, Van Gogh, Simpsons, Cyberpunk, Watercolor, Claymation, Pencil Sketch
- ๐๏ธ Style Strength Slider โ fine-tune from subtle (40%) to full transformation (90%)
- ๐ค IP-Adapter Face Lock โ preserve face identity across styles
- โ๏ธ Before/After Compare Mode โ drag to reveal the transformation
- ๐ฎ Custom LoRA styles โ Arcane Painterly & 3D Claymation trained styles
- ๐ Fully deployed โ Vercel frontend + Render backend
Frontend: toonify-studio.vercel.app
API Health: toonify-backend-8mup.onrender.com/health
API Docs: toonify-backend-8mup.onrender.com/docs
โ ๏ธ The backend runs on Render's free tier โ first request after inactivity may take ~50s to wake up.
| Style | Emoji | Description |
|---|---|---|
| Modern Disney | ๐ฐ | Vibrant, expressive Disney animation |
| Anime | โฉ๏ธ | Clean Makoto Shinkai aesthetic |
| Studio Ghibli | ๐ฟ | Soft, painterly Miyazaki-style |
| Arcane Painterly | ๐ฎ | Custom LoRA โ dramatic neon lighting |
| 3D Claymation | ๐งฑ | Custom LoRA โ tactile clay texture |
| Pixar 3D | โจ | Warm Pixar-style 3D render |
| Comic Book | ๐ฅ | Bold Marvel comic ink outlines |
| Van Gogh | ๐ป | Post-impressionist swirling brushstrokes |
| Simpsons | ๐ก | Classic yellow skin flat cartoon |
| Cyberpunk | ๐ | Neon-lit blade runner atmosphere |
| Watercolor | ๐จ | Soft flowing paper watercolor |
| Pencil Sketch | โ๏ธ | Fine graphite crosshatching |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ TOONIFY Stack โ
โโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโค
โ FRONTEND โ BACKEND โ INFERENCE โ
โ Vercel โ Render โ HuggingFace Spaces โ
โ โ โ (optional GPU) โ
โ React 18 โ FastAPI 0.111 โ Gradio + SD โ
โ Vite 5 โ Uvicorn โ nitrosocke/mo-di โ
โ CSS3 โ Pillow (mock) โ T4 GPU โ
โ โ gradio_client โ โ
โโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโ
โ /api/* proxy โ HF_SPACES_URL
vercel.json rewrites gradio_client.predict()
Data Flow:
User Photo โ Vercel Frontend โ Render Backend โ HF Spaces (GPU) โ Cartoon Image
โ (if HF unavailable)
Mock PIL filter โ Cartoon Image
- React 18 + Vite 5 โ fast SPA
- Vanilla CSS โ custom design system with glassmorphism, dark mode
- Google Fonts โ Outfit + Inter
- Axios โ API client with upload progress
- FastAPI โ async Python REST API
- Uvicorn โ ASGI server
- Pillow โ mock cartoon filters (no GPU)
- diffusers โ Stable Diffusion img2img (GPU mode)
- gradio_client โ HF Spaces proxy client
- Stable Diffusion 1.5 โ base model
- nitrosocke/mo-di-diffusion โ Disney-style fine-tune
- IP-Adapter โ face identity preservation
- Custom LoRA โ Arcane & Claymation styles (trained in Colab)
- Vercel โ frontend hosting (CDN edge)
- Render โ backend hosting (free tier)
- HuggingFace Spaces โ GPU inference (optional T4)
- GitHub Actions โ auto-deploy on push
- Node.js 20+
- Python 3.12+
- Git
git clone https://github.com/ANKARAHAMSA/TOONIFY.git
cd TOONIFYcd backend
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
MOCK_MODE=true uvicorn main:app --reload
# Backend running at http://localhost:8000cd frontend
npm install
npm run dev
# Frontend running at http://localhost:5173Open http://localhost:5173 โ the Vite proxy forwards /api/* to the backend automatically.
| Variable | Default | Description |
|---|---|---|
MOCK_MODE |
false |
Use PIL filters instead of SD (no GPU) |
MODEL_PATH |
./mo-di-diffusion |
HuggingFace model ID or local path |
USE_IP_ADAPTER |
false |
Enable IP-Adapter face lock |
IP_ADAPTER_SCALE |
0.7 |
Face lock strength (0.0โ1.0) |
HF_SPACES_URL |
`` | HF Space ID for GPU inference proxy |
ALLOWED_ORIGINS |
* |
CORS allowed origins |
PORT |
8000 |
Server port |
| Variable | Description |
|---|---|
VITE_API_BASE |
Override API base URL (optional) |
- Import
ANKARAHAMSA/TOONIFYon vercel.com - Set Root Directory โ
frontend - Click Deploy โ auto-detects Vite
- New Web Service โ connect
ANKARAHAMSA/TOONIFY - Language: Python | Root Directory:
backend - Build Command:
pip install -r requirements.txt - Start Command:
uvicorn main:app --host 0.0.0.0 --port $PORT - Add env vars:
MOCK_MODE=true,PYTHON_VERSION=3.12.6
- Create new Space at huggingface.co/new-space
- Upload
spaces/app.py,spaces/requirements.txt,spaces/README.md - Set hardware to T4 Small
- Add
HF_SPACES_URL=your-username/toonifyto Render env vars
Train your own Arcane-style LoRA using the provided Colab notebook:
Training images: training_images/arcane/ (30 Arcane-style 512ร512 PNGs)
Trigger word: arcane_toonify style
Base model: runwayml/stable-diffusion-v1-5
TOONIFY/
โโโ frontend/ # React + Vite app
โ โโโ src/
โ โ โโโ App.jsx # Main app with state management
โ โ โโโ api.js # Axios API wrapper
โ โ โโโ components/
โ โ โ โโโ StrengthSlider.jsx # Style strength control
โ โ โ โโโ CompareSlider.jsx # Before/After comparison
โ โ โโโ index.css # Design system + animations
โ โโโ vercel.json # Vercel rewrite config
โ
โโโ backend/ # FastAPI backend
โ โโโ main.py # API routes
โ โโโ pipeline.py # SD pipeline + 12 styles + HF client
โ โโโ models.py # Pydantic schemas
โ โโโ requirements.txt # Pinned dependencies
โ โโโ runtime.txt # Python 3.12.6
โ
โโโ spaces/ # HuggingFace Spaces inference app
โ โโโ app.py # Gradio SD inference app
โ โโโ requirements.txt
โ โโโ README.md
โ
โโโ notebooks/
โ โโโ lora_training_complete.ipynb # 9-cell LoRA training
โ
โโโ training_images/
โ โโโ arcane/ # 30 Arcane training images + metadata
โ
โโโ scripts/
โโโ generate_placeholders.py
- Stable Diffusion img2img pipeline
- 12 art styles (7 base + 2 LoRA + 3 new)
- IP-Adapter face identity preservation
- Style Strength Slider
- Before/After Compare Mode
- Vercel + Render deployment
- HuggingFace Spaces GPU inference
- Custom LoRA training pipeline
- User gallery (Firebase)
- Social sharing
- Credits / monetization (Stripe)
- Mobile app (React Native)
- Video cartoonization
MIT License โ see LICENSE for details.
Built with โค๏ธ using Stable Diffusion, FastAPI, and React
toonify-studio.vercel.app
toonify-studio.vercel.app