ReDoodle is a "daily" web puzzle game where you are given a starting image, and your goal is to transform it into a goal image through a series of prompts.
ReDoodleDemoVideo.mp4
This repo is meant as a proof of concept and is not production ready nor will it be maintained.
The installation instructions here are meant for local development and were primarily tested on a Linux server with a modern NVIDIA GPU.
The client is built using Vite and uses the 'react-swc-ts' template. It also uses Tailwind CSS for styling.
- nvm or nvm-windows to install Node.js versions
nvm install 22install Node.js 22nvm use 22to use Node.js 22
cd appnpm installnpm run dev
The server is built using FastAPI in Python. It uses SQLite to persist game state. For comparing images we use a Vision Transformer (ViT) image feature model from Hugging Face. Installing the Poetry environment will also install PyTorch and the model will be loaded upon server start.
- Install Python >=3.11
- Install Poetry
cd serverpoetry installto install the virtual environmentadd-puzzlesto load the puzzles in the data folder into the database
cd serverpoetry shellto make sure the virtual environment is activatedfastapi dev main.py --host 0.0.0.0to run the server- The
--host 0.0.0.0flag is necessary to allow connections from other devices on the network as needed by the client.
- The
For generating images we use ComfyUI. The ComfyUI server is run as a separate process from the main server.
- NVIDIA GPU
cd server/ComfyUIpython3 -m venv .venvto create a new virtual environment for image generationsource .venv/bin/activateto activate the new virtual environmentpip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu124pip install -r requirements.txt- Download the model files and put them into the correct folders
sd3.5_large_turbo.safetensorsshould be placed in server/ComfyUI/models/checkpointsclip_g.safetensorsshould be placed in server/ComfyUI/models/clipclip_l.safetensorsshould be placed in server/ComfyUI/models/clipt5xxl_fp8_e4m3fn_scaled.safetensorsshould be placed in server/ComfyUI/models/clip
cd server/ComfyUIsource .venv/bin/activateto activate the virtual environment on Linux. ComfyUI does not support Poetry for the environment, so we use the built in Python environment.python main.pyto start the image generation server.