Draw to Life is an AI-powered drawing application that can turn your sketches into realistic images. You can draw directly on the canvas and download the result image. Check out the live demo HERE.
Draw to Life uses a ControlNet model hosted on Replicate to generate refined images using drawings as a template and a text prompt. The app allows you to draw directly on the canvas and sends the image to the model through an Express Route using the Replicate API.
To get started, you will need a Cloudinary account and API keys. Follow these steps to retrieve your keys:
- Go to Cloudinary and create an account.
- Go to "Dashboard" and copy your Cloud Name, API Key, and API Secret.
Next, you will need to sign up for a Replicate account and obtain an API key. Follow these steps to retrieve your key:
- Create an account on Replicate.
- Go to "Account" in the navbar.
- Copy your API token.
After obtaining your keys, create a .env file in the root of the server directory and set your keys as shown here:
CLOUDINARY_CLOUD_NAME="YOUR_CLOUDINARY_CLOUD_NAME_HERE"
CLOUDINARY_API_KEY="YOUR_CLOUDINARY_API_KEY_HERE"
CLOUDINARY_API_SECRET="YOUR_CLOUDINARY_API_SECRET_HERE"
REPLICATE_API_TOKEN="YOUR_REPLICATE_API_TOKEN_HERE"
Run the following command to install the necessary dependencies in both the client and server folders:
npm install
Start the server (available at http://localhost:5000)
Run the following command to start the server:
npm start
Start the client (available at http://localhost:5173)
Run the following command to start the client:
npm run dev