AI image generation powered by DrawThings API, featuring an intelligent chat assistant for prompt crafting and multiple generation modes.
This application requires the DrawThings application to be installed and running locally with HTTP server enabled:
- Download and install DrawThings from the official source
- Launch DrawThings
- Enable the HTTP server in DrawThings settings:
- Go to Settings
- Enable "HTTP Server"
- Ensure it's running on port 7860 (default)
- Keep DrawThings running while using this application
The illustraitor application connects to DrawThings' local API to generate images. Without DrawThings running with HTTP server enabled, image generation will not work.
- Simple Mode: Quick access to basic image generation with preset styles
- Advanced Mode:
- AI Chat Assistant for guided prompt creation
- Custom JSON configuration for fine-tuned control
- Multiple size options: 256px, 512px, 768px
- 9 carefully crafted style presets:
- Photo Realistic
- Animated Style
- Small Logo
- Quick Draft
- Fluid Gradient
- Neon Dreams
- Retro Wave
- Glass Morphism
- Paper Cut
- Intelligent chat interface powered by GPT-4
- Expert guidance for prompt crafting
- Automatic parameter optimization based on style
- Real-time JSON configuration generation
- Recent generations gallery
- Detailed image metadata viewing
- Image deletion capability
- Full-screen modal view with advanced details
- Python 3.8+
- Node.js 14+
- DrawThings API running locally
- OpenAI API key
- Clone the repository:
git clone [repository-url]
cd illustraitor- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Create a .env file with your API keys:
OPENAI_API_KEY=your_openai_api_key
- Ensure DrawThings API is running locally on port 7860
OPENAI_API_KEY: Your OpenAI API key for chat assistance
Available sizes are configured in app.py:
- Small: 256x256
- Medium: 512x512
- Large: 768x768
Presets are defined in presets.json with the following parameters:
- steps
- guidance_scale
- guidance_embed
- sampler
- negative_prompt
- aesthetic_score
- sharpness
- refiner_start
python app.pyThe server will start on http://localhost:8000
- Enter your prompt
- Select image size
- Choose a style preset
- Click "Generate Image"
- Switch to Advanced Mode
- Describe your image idea to the AI assistant
- Refine based on AI suggestions
- Use generated configuration
- Switch to Advanced Mode
- Select "Custom JSON"
- Input or paste your configuration
- Click "Generate Image"
- View generated images in the gallery
- Click images to view full details
- Delete unwanted images
- Export metadata for reference
- Returns the main application interface
- Generates an image based on provided parameters
- Parameters:
- prompt (string)
- size (string): small/medium/large
- preset (string): preset name
- custom_json (string, optional): custom configuration
- Interacts with AI assistant
- Parameters:
- message (string): user message
- Returns recent image generations
- Deletes an image and its metadata
- Parameters:
- image_path (string)
{
"steps": 25,
"guidance_scale": 7.0,
"guidance_embed": 3.0,
"sampler": "DPM++ 2M Karras",
"sharpness": 2
}{
"steps": 20-25,
"guidance_scale": 5.0-6.5,
"guidance_embed": 2.0-2.5,
"sampler": "Euler a",
"sharpness": 1
}{
"steps": 25,
"guidance_scale": 6.5,
"guidance_embed": 2.5,
"sampler": "Euler a",
"sharpness": 1
}illustraitor/
βββ app.py # Main Flask application
βββ presets.json # Style preset configurations
βββ static/
β βββ style.css # Application styling
β βββ output/ # Generated images and metadata
βββ templates/
βββ index.html # Main application interface
- Flask: Web framework
- OpenAI: Chat assistance
- aiohttp: Async HTTP client
- python-dotenv: Environment management
- Average generation time: 2:15-2:25 minutes
- Supported image sizes: up to 768x768
- Concurrent generations: Single queue
- Storage: Local filesystem
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
MIT