This project is an AI-powered drawing board that allows users to create sketches and generate images based on their drawings and prompts using a Stable Diffusion model.
- Draw on a canvas with different brush sizes and colors
- Upload images to the canvas
- Use an eraser to remove parts of the drawing
- Undo the last action
- Generate images based on the drawing and a text prompt
- Adjust inference steps and guidance scale for image generation
-
Clone the repository:
git clone https://github.com/oliverkristianfritsche/sketch2art.git cd sketch2art -
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Run the Flask application:
python routes.py
-
Open your web browser and go to
http://127.0.0.1:5000.
routes.py: Contains the Flask routes for the web application.utils.py: Contains the image processing logic using the Stable Diffusion model.static/js/scripts.js: Contains the JavaScript code for the front-end interactions.templates/index.html: Contains the HTML structure of the web application.- requirements.txt: Lists the required Python packages.
