Generate illustrations and images dynamically using OpenAI DALL-E and Google Imagen models.
Project description
Tellers Network Image Generation Tool (tlnw-generate-image)
tlnw-generate-image is a standalone, publishable package that unifies AI image generation for stories and posts in the Tellers Network ecosystem. It supports OpenAI (DALL-E 2, DALL-E 3, and legacy gpt-image-1.5) as well as Google Gemini Imagen 4 models.
Installation
pip install tlnw-generate-image
Features
- Extensible OOP Provider Architecture: Clean separation of model providers (
DalleProvider,GptImageProvider,GoogleImagenProvider) with registry-based dynamic routing. - Intelligent Size & Quality Preset Mapping: Standardizes orientation presets (
landscape,portrait,square) and qualities, automatically converting them to provider-native formats: aspect ratios (e.g."16:9") for Google Imagen, or concrete dimensions (e.g."1792x1024") for OpenAI. - Custom Dimension Resolution: Automatically maps exact resolution values (e.g.,
1920x1080or1536x1024.txtin file names) to the closest supported native aspect ratios when routing to Imagen, while passing OpenAI dimensions as-is. - Auto-resolution of Output Sizing: Extracts target sizes from prompt filename trailing suffixes (e.g.,
-1536x1024.txt). - Prompt Composition: Concatenates local directory
illustration-master-prompt.txtautomatically with individual scene prompts. - Automatic WebP Conversion: Generates and optimizes WebP formats (
featured.webpandthumbnail.webpwith max-dimension constraints). - Automated Jekyll/Hugo Updating: Automatically updates the article frontmatter's
imagesblock.
Usage
Generate illustration for a story folder:
generate-image /path/to/story_folder --model dall-e-3
Process specific prompt files:
generate-image --file /path/to/prompt-1536x1024.txt --model imagen-4-ultra
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 tlnw_generate_image-0.2.0.tar.gz.
File metadata
- Download URL: tlnw_generate_image-0.2.0.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2266058627c62f46ff4dd59f8ff197d6003f9309c525bba520def625c359d637
|
|
| MD5 |
df1a39e7e1f3090f7b6b6132aa8fb76c
|
|
| BLAKE2b-256 |
6f14b569262f07fa9f42034f08e4e38fdfe19652449605eeefafe5ff82709aa9
|
Provenance
The following attestation bundles were made for tlnw_generate_image-0.2.0.tar.gz:
Publisher:
publish-to-pypi.yml on tellersnetwork/tlnw-generate-image
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tlnw_generate_image-0.2.0.tar.gz -
Subject digest:
2266058627c62f46ff4dd59f8ff197d6003f9309c525bba520def625c359d637 - Sigstore transparency entry: 1809316839
- Sigstore integration time:
-
Permalink:
tellersnetwork/tlnw-generate-image@c39548af07b158d46d9a3b7c82e43ad94f439922 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/tellersnetwork
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@c39548af07b158d46d9a3b7c82e43ad94f439922 -
Trigger Event:
release
-
Statement type:
File details
Details for the file tlnw_generate_image-0.2.0-py3-none-any.whl.
File metadata
- Download URL: tlnw_generate_image-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ea54d35b19101273c45d988ee57abc87e4cf1c97fa0b8cbaae803d7818a0894
|
|
| MD5 |
9f35749b47c6a55cbba1bacb182be82d
|
|
| BLAKE2b-256 |
bbaa30389337991cf8e6512fac657dfe72d0cfc88566b468468f0d4bb1244bdb
|
Provenance
The following attestation bundles were made for tlnw_generate_image-0.2.0-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on tellersnetwork/tlnw-generate-image
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tlnw_generate_image-0.2.0-py3-none-any.whl -
Subject digest:
8ea54d35b19101273c45d988ee57abc87e4cf1c97fa0b8cbaae803d7818a0894 - Sigstore transparency entry: 1809316852
- Sigstore integration time:
-
Permalink:
tellersnetwork/tlnw-generate-image@c39548af07b158d46d9a3b7c82e43ad94f439922 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/tellersnetwork
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@c39548af07b158d46d9a3b7c82e43ad94f439922 -
Trigger Event:
release
-
Statement type: