A simple image generator that focuses on prompt adherence and aesthetics.
Project description
dalle-generator
An image generator that focuses on prompt adherence and unique aesthetics.
Installation
pip install dalle-generator
Key Features
- 🎨 Image Generation
- Text-to-Image Generation
- Multiple Image Output
- Smart Prompt Handling
- 🔄 Flexible Integration
- Interactive Web UI
- REST API Server
- Python Library
- 💾 Output Management
- Multiple Output Formats
- Date-based Organization
- Automatic File Naming
Usage
Python Library
from dalle_generator import DalleGenerator
# Initialize
client = DalleGenerator(
mode="default", # Mode (default/webui/api)
log_on=True, # Enable logging
log_to=None, # Log directory
save_to="outputs", # Output directory
save_as="webp" # Output format (webp/jpg/pil)
)
# Generate images
results = client.image_generate(
prompt="a beautiful landscape"
)
# Returns list of file paths or PIL Images if save_as='pil'
Web UI
Start the Gradio web interface:
client = DalleGenerator(mode="webui")
# OR
client.start_webui(
host="0.0.0.0", # Server host
port=7860, # Server port
browser=True, # Launch browser
upload_size="4MB", # Max upload size
public=False, # Enable public URL
limit=10, # Max concurrent requests
quiet=False # Quiet mode
)
REST API
Start the Flask API server:
client = DalleGenerator(mode="api")
# OR
client.start_api(
host="0.0.0.0", # Server host
port=5734, # Server port
debug=False # Enable debug mode
)
API Endpoints
POST /v1/api/image/generate
Configuration
Output Formats
webp- High quality, small sizejpg- Standard compressedpil- PIL Image object
Output Structure
outputs/
└── YYYY-MM-DD/
├── YYYYMMDD_HHMMSS_UUID8_1.webp
├── YYYYMMDD_HHMMSS_UUID8_2.webp
└── ...
License
See LICENSE for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dalle_generator-25.3.5.tar.gz
(25.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dalle_generator-25.3.5.tar.gz.
File metadata
- Download URL: dalle_generator-25.3.5.tar.gz
- Upload date:
- Size: 25.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
724ad9425f811e86d89505e65eba5ed2a7222b3a2c1090956dcce6ebff952d95
|
|
| MD5 |
87a7eb659f96f1e9873d116544fbea42
|
|
| BLAKE2b-256 |
44cd48df870441273f97fc0940b466b02b1856fccbb8b4d68ac7faaeada14e59
|
File details
Details for the file dalle_generator-25.3.5-py3-none-any.whl.
File metadata
- Download URL: dalle_generator-25.3.5-py3-none-any.whl
- Upload date:
- Size: 25.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53fe4ed834f25f0d1fbd4fe2a84936d32a001ef8b5a850c9e464c87a404d0629
|
|
| MD5 |
d4af51a3a6293bd34719ef9563706ff3
|
|
| BLAKE2b-256 |
d2a9c224dc9947b32a003345a316f77a67e5f33534c0fc87f2c50399a6a2ce9a
|