Skip to main content

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 size
  • jpg - Standard compressed
  • pil - 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.4.tar.gz (25.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dalle_generator-25.3.4-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

Details for the file dalle_generator-25.3.4.tar.gz.

File metadata

  • Download URL: dalle_generator-25.3.4.tar.gz
  • Upload date:
  • Size: 25.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.11

File hashes

Hashes for dalle_generator-25.3.4.tar.gz
Algorithm Hash digest
SHA256 5e6382f2917d262430341649fc225472b776b567c1cb65f6c06a640406e50a8a
MD5 624dd3c46d44c3a1f00db7549ea87498
BLAKE2b-256 9d0ee128e81cff2eef5b186eec27e932ae78694a686469c71e5db01496024875

See more details on using hashes here.

File details

Details for the file dalle_generator-25.3.4-py3-none-any.whl.

File metadata

File hashes

Hashes for dalle_generator-25.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 69fa2e2976b94b689fe697ae3ae0e4088cee847fb83b9e8424fc2ecf530b6837
MD5 0afd3fe393ba97118a29568cfc0cd880
BLAKE2b-256 844e00468d42d4c3eda7c16556f80f93e700d556fa061f1da8172f3d6913e0f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page