Skip to main content

🎨 Goblin AI

Image generation from Python or a local browser interface

PyPI version Python Downloads License


Goblin image styles

Install · Generate · Server and UI


Generate AI images from Python or a local browser interface, with optional CPU/GPU upscaling. No account or personal API key is needed for ordinary use. First use performs setup; later calls reuse a managed session.

Read the documentation · Complete Python API · HTTP API · Troubleshooting

Install

Use CPython 3.11–3.14 with a wheel matching your OS and architecture. Release targets are Windows/Linux x86-64 and macOS Intel/Apple Silicon. PyPy and other Python ABIs are unsupported.

pip install goblin-ai

The base install includes generation, prompt tools, PNG enhancement, interpolation, CLI, UI and HTTP API. Install one AI inference backend for neural upscaling:

pip install "goblin-ai[cpu]"
# Or choose one accelerated backend in a separate environment:
pip install "goblin-ai[gpu]"
# AMD on Windows (DirectML):
pip install "goblin-ai[amd]"
# Apple on macOS (CoreML):
pip install "goblin-ai[apple]"

On Intel macOS with CPython 3.14, the base install works, but the CPU neural extra has no compatible ONNX Runtime wheel. Use CPython 3.13 for neural upscaling on Intel macOS, or use another supported platform.

Choose one runtime per environment: gpu uses NVIDIA CUDA on Windows/Linux and CoreML on macOS; amd uses DirectML on Windows. AMD Linux additionally requires a compatible ROCm/MIGraphX installation; follow the hardware setup guide. The apple extra selects the macOS ONNX Runtime with CoreML support. The quality, best and all extras remain CPU aliases; they no longer install the old PyTorch/BasicSR stack. Models download on their first explicit use and are cached in the user's cache directory. GOBLIN_MODEL_DIR can select another writable cache directory.

See installation and first image for environment setup and device verification.

Generate

import asyncio
from goblin import generate, close

async def main():
    try:
        image = await generate("a red ceramic teapot", model="goblin-flux", output="teapot.png")
        print(f"Saved {len(image)} bytes")
    finally:
        await close()

asyncio.run(main())

generate() returns image bytes. Use enhance_output=False to keep the provider's original bytes. Model aliases include goblin-flux, goblin-anime, goblin-realistic and goblin-sd; use list_models() for the catalog.

Default enhanced output is PNG at 768×768. Local processing accepts 8-bit grayscale, RGB and RGBA images; PNG output preserves transparency, resizing alpha to match the output dimensions. Set width and height for another size. First-use setup, remote queueing and image generation take additional time; session reuse avoids repeating setup.

What you can do

Feature Entry points Guide
Simple/batch generation generate, generate_batch Generation
Explicit lifecycle and metadata Goblin, GenerateRequest Advanced generation
Automatic model selection auto_map, detect_model Models and prompts
Catalog discovery and presets list_models, get_model_*, preset dictionaries Models and prompts
Local prompt tools random_prompt, create_variations, build_prompt Prompt tools
Resize/neural upscaling enhance, upscale, upscale_default, upscale_ultra Upscaling
Device/cache management set_device, get_device_info, download_model Upscaling
CLI, UI and REST API goblin server, goblin ui, create_app Server

The API reference documents every public export, constructor and class method, including argument defaults and return behavior.

Upscaling

upscale_default(image_bytes, width, height, preset="auto") selects a practical preset. fast uses interpolation without a neural model; balanced uses compact SPAN, quality uses MoSR, photo uses 2× RealPLKSR, and best uses DAT2. Neural models require a CPU or GPU extra. No single preset is best for every image; see model attribution for model origins and attribution.

from pathlib import Path
from goblin import upscale_default

image = Path("teapot.png").read_bytes()
larger = upscale_default(image, 1536, 1536, preset="auto")
Path("teapot-large.png").write_bytes(larger)

Automatic processing prioritizes speed. Restoration is opt-in. See the upscaling guide for measured timings, direct models, progress callbacks, CPU/GPU selection and cache management.

Server and UI

goblin server --port 8000
goblin ui --port 8000
goblin --port 8000

The UI starts with Auto model routing from your prompt. Open the model menu to search models and categories. Custom size reveals dimensions and processing together; you can change the next image's settings while generation runs. See the UI guide.

The legacy flag-only CLI remains supported. The server binds to localhost by default. /health reports initialization and readiness; generation returns HTTP 503 while initialization is incomplete, has failed, or the managed session is unavailable. Generation and upscaling requests have resource and per-client request limits. Use an authenticated reverse proxy when exposing the service publicly.

curl -X POST http://127.0.0.1:8000/generate -H "Content-Type: application/json" -d '{"prompt":"a red ceramic teapot","model":"goblin-flux","width":768,"height":768,"upscale_preset":"fast"}' --output teapot.png

Use curl.exe in Windows PowerShell when curl is an alias. /docs provides an interactive HTTP reference; see all endpoints and request/response examples.

Distribution and support

Releases distribute platform-specific compiled wheels, with no source distribution. Compiled modules cannot make reverse engineering impossible.

Generation depends on an upstream service. Setup, queueing and network latency can vary, and upstream changes can affect availability.

Report a minimal example with Goblin/Python versions, OS and chosen extra in the issue tracker. Keep credentials and session cache contents out of public reports. Goblin uses a proprietary license; downloaded models retain their separate author licenses.

Metadata

Release files for goblin-ai 2.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for goblin-ai 2.2.0
File Actions
goblin_ai-2.2.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for goblin_ai-2.2.0-cp314-cp314-win_amd64.whl
goblin_ai-2.2.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 Details for goblin_ai-2.2.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
goblin_ai-2.2.0-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details for goblin_ai-2.2.0-cp314-cp314-macosx_11_0_arm64.whl
goblin_ai-2.2.0-cp314-cp314-macosx_10_15_x86_64.whl CPython 3.14 CPython 3.14 macOS 10.15+ x86-64 Details for goblin_ai-2.2.0-cp314-cp314-macosx_10_15_x86_64.whl
goblin_ai-2.2.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for goblin_ai-2.2.0-cp313-cp313-win_amd64.whl
goblin_ai-2.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details for goblin_ai-2.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
goblin_ai-2.2.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for goblin_ai-2.2.0-cp313-cp313-macosx_11_0_arm64.whl
goblin_ai-2.2.0-cp313-cp313-macosx_10_13_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.13+ x86-64 Details for goblin_ai-2.2.0-cp313-cp313-macosx_10_13_x86_64.whl
goblin_ai-2.2.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for goblin_ai-2.2.0-cp312-cp312-win_amd64.whl
goblin_ai-2.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details for goblin_ai-2.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
goblin_ai-2.2.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for goblin_ai-2.2.0-cp312-cp312-macosx_11_0_arm64.whl
goblin_ai-2.2.0-cp312-cp312-macosx_10_13_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.13+ x86-64 Details for goblin_ai-2.2.0-cp312-cp312-macosx_10_13_x86_64.whl
goblin_ai-2.2.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for goblin_ai-2.2.0-cp311-cp311-win_amd64.whl
goblin_ai-2.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details for goblin_ai-2.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
goblin_ai-2.2.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details for goblin_ai-2.2.0-cp311-cp311-macosx_11_0_arm64.whl
goblin_ai-2.2.0-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details for goblin_ai-2.2.0-cp311-cp311-macosx_10_9_x86_64.whl

Total release size: 44.5 MB

Release files / goblin_ai-2.2.0-cp314-cp314-win_amd64.whl

Download URL goblin_ai-2.2.0-cp314-cp314-win_amd64.whl
Size 2.2 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
4628b40dc38b75dda292f2934ff9731714f708c5d76d6f7e5558b8110c8c76ad
BLAKE2b-256 checksum
How to use checksums
d47b5e441519f5e8a061fc6ebc006b59e1580468ccd8f230282912ac386a1783
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.2.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL goblin_ai-2.2.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 4.7 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e43f91b0b7c848eb70e6bdb3d958fb8c30535de1c802f0eca8176261fc65468b
BLAKE2b-256 checksum
How to use checksums
a02cc91627372756a5591d86fd0879928a4374164564ca735d43f6a9da5ea3ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.2.0-cp314-cp314-macosx_11_0_arm64.whl

Download URL goblin_ai-2.2.0-cp314-cp314-macosx_11_0_arm64.whl
Size 2.2 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a543a9ec9983eaec7f7f803bef987316578389773e2e98b3811438ee1a9b0a0a
BLAKE2b-256 checksum
How to use checksums
41ea226a713a0c2563afd31daa353558c82291d9981cae601fce0bdcb8888845
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.2.0-cp314-cp314-macosx_10_15_x86_64.whl

Download URL goblin_ai-2.2.0-cp314-cp314-macosx_10_15_x86_64.whl
Size 2.3 MB
Tags CPython 3.14 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
fec1385f1b588fb682b3df08a74f34a9069ec0e685cde6faf1b6e9b6f0566388
BLAKE2b-256 checksum
How to use checksums
3c2dd37d9717ec18b1d12bb54ef8c35a0d8de054b86fa36b364df82bc6882f23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.2.0-cp313-cp313-win_amd64.whl

Download URL goblin_ai-2.2.0-cp313-cp313-win_amd64.whl
Size 2.1 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
c092f39b0c76ede8f9aa4522b556e728582ab16112166db54a20cc2cf545f4f6
BLAKE2b-256 checksum
How to use checksums
2a5c7584429dd0e5bd653106a09a2d540b952ff78e3170d68e51c39b5fff5231
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL goblin_ai-2.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 4.6 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
5c8cbc00315523e05893c42653da8270c522381623a237e3155425372d32d92b
BLAKE2b-256 checksum
How to use checksums
c6a490b6c5d90ae9e7e0a3fd4c22c6bd19046b06bb4f4d2846e6aa050777851f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.2.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL goblin_ai-2.2.0-cp313-cp313-macosx_11_0_arm64.whl
Size 2.2 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
31a766595240eb7681fd57d3bf7f45571429d754e3b2a33e2df741a37615ebbc
BLAKE2b-256 checksum
How to use checksums
ccc49132e5291ae925b56a36a3941db4ec295f3c240a71872a4b697fa1e4b7ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.2.0-cp313-cp313-macosx_10_13_x86_64.whl

Download URL goblin_ai-2.2.0-cp313-cp313-macosx_10_13_x86_64.whl
Size 2.3 MB
Tags CPython 3.13 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
b727793a0fe72ec17932ef4b18e1ac1676fc0e44bf5cc256ba1d7234b67ffb8b
BLAKE2b-256 checksum
How to use checksums
8844d643fb56bca6282c4e32def272d8b71657cdd472f0306d0c29e40206f5c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.2.0-cp312-cp312-win_amd64.whl

Download URL goblin_ai-2.2.0-cp312-cp312-win_amd64.whl
Size 2.1 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
8a8b6a49df931496e14d835592703c10c3b82240c19897b818d2860475e6b4d5
BLAKE2b-256 checksum
How to use checksums
58289d561235a99c068d2a1526f8e99a62d1184a2301eb079caf3cdf9bf02447
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL goblin_ai-2.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 4.6 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
7a22966639443cdc5f6a7c71c04774e5aa4a40b5d5c97c10445182c6047efafc
BLAKE2b-256 checksum
How to use checksums
f5635795f7367bc44f43891555054195bb9e4441a7508935f936098af9e54991
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.2.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL goblin_ai-2.2.0-cp312-cp312-macosx_11_0_arm64.whl
Size 2.1 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
84e2131d51fbdcf0bd52ff9c77fcf4274e1f71243bd7b27515efd6832c7fdc97
BLAKE2b-256 checksum
How to use checksums
a37c2648d16d86f0b7a1ca703875f2cc485fb5ad4036854a590b5d4ff8edde36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.2.0-cp312-cp312-macosx_10_13_x86_64.whl

Download URL goblin_ai-2.2.0-cp312-cp312-macosx_10_13_x86_64.whl
Size 2.3 MB
Tags CPython 3.12 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
a15156b2af3885f676019bc33de3b8e32c6ed51e593f80a0d1656d1245516e06
BLAKE2b-256 checksum
How to use checksums
2c2fa32f502c47735304d6d1197410c3935831e2ec36d9b6120e837a84894d72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.2.0-cp311-cp311-win_amd64.whl

Download URL goblin_ai-2.2.0-cp311-cp311-win_amd64.whl
Size 2.1 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
7d03d048d66cbd41a866d659389a184f8979bc00e6778be1609c668f88bc7e2d
BLAKE2b-256 checksum
How to use checksums
b6279b9338470c71b6073e7a5719e2e4b2d07e8e9fbcc16ead37b55230a8b1cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL goblin_ai-2.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 4.2 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
2cfb4aec3c9904b953490f06d9f65233e9f249411a8c02da7d0b9d1153b6d1e7
BLAKE2b-256 checksum
How to use checksums
2c8649c5d5d18d7845ec111c38e8c0a9d6739c3b5c20f6f730f6f5f1d6d69c8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.2.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL goblin_ai-2.2.0-cp311-cp311-macosx_11_0_arm64.whl
Size 2.1 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
88300cf6a6c02a1c68e4951915cf8df65dc39c090c6049f68bc3372900bbde31
BLAKE2b-256 checksum
How to use checksums
b0bb91ed8a109411940e3226a5a18896caacf1d6570fdec495dfa666539956c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.2.0-cp311-cp311-macosx_10_9_x86_64.whl

Download URL goblin_ai-2.2.0-cp311-cp311-macosx_10_9_x86_64.whl
Size 2.3 MB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
03df543774a393878af24a6208ab0801ead50644ede99d2da893550e5084cec4
BLAKE2b-256 checksum
How to use checksums
08b1529a018aa8565e55a05e4e495e8bab62ad44f65d5e8aed9a205335f3e7b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for goblin-ai 2.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page