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, in a separate environment for NVIDIA CUDA:
pip install "goblin-ai[gpu]"

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 CPU or GPU, rather than installing both runtimes in the same environment. 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.1.3

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.1.3
File Actions
goblin_ai-2.1.3-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for goblin_ai-2.1.3-cp314-cp314-win_amd64.whl
goblin_ai-2.1.3-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.17+ x86-64, Linux glibc 2.28+ x86-64 Details for goblin_ai-2.1.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
goblin_ai-2.1.3-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details for goblin_ai-2.1.3-cp314-cp314-macosx_11_0_arm64.whl
goblin_ai-2.1.3-cp314-cp314-macosx_10_15_x86_64.whl CPython 3.14 CPython 3.14 macOS 10.15+ x86-64 Details for goblin_ai-2.1.3-cp314-cp314-macosx_10_15_x86_64.whl
goblin_ai-2.1.3-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for goblin_ai-2.1.3-cp313-cp313-win_amd64.whl
goblin_ai-2.1.3-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.1.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
goblin_ai-2.1.3-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for goblin_ai-2.1.3-cp313-cp313-macosx_11_0_arm64.whl
goblin_ai-2.1.3-cp313-cp313-macosx_10_13_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.13+ x86-64 Details for goblin_ai-2.1.3-cp313-cp313-macosx_10_13_x86_64.whl
goblin_ai-2.1.3-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for goblin_ai-2.1.3-cp312-cp312-win_amd64.whl
goblin_ai-2.1.3-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.28+ x86-64, Linux glibc 2.17+ x86-64 Details for goblin_ai-2.1.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
goblin_ai-2.1.3-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for goblin_ai-2.1.3-cp312-cp312-macosx_11_0_arm64.whl
goblin_ai-2.1.3-cp312-cp312-macosx_10_13_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.13+ x86-64 Details for goblin_ai-2.1.3-cp312-cp312-macosx_10_13_x86_64.whl
goblin_ai-2.1.3-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for goblin_ai-2.1.3-cp311-cp311-win_amd64.whl
goblin_ai-2.1.3-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.1.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
goblin_ai-2.1.3-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details for goblin_ai-2.1.3-cp311-cp311-macosx_11_0_arm64.whl
goblin_ai-2.1.3-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details for goblin_ai-2.1.3-cp311-cp311-macosx_10_9_x86_64.whl

Total release size: 44.2 MB

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

Download URL goblin_ai-2.1.3-cp314-cp314-win_amd64.whl
Size 2.2 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
41c9978513ca5715cb1a236904fe734790920cf1ddd1f88e52677f0878ebc396
BLAKE2b-256 checksum
How to use checksums
f45b5fb7e9d3427dd296a81c0e8bfa7bffaf6a19e00b20c9e8be6a958c97f459
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.1.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL goblin_ai-2.1.3-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
b63e44ed5dbe0be16425619b8f64d1688d85c3053b62e78e4d0580f81f5ef045
BLAKE2b-256 checksum
How to use checksums
6cae7727ba38bff1bdec00e6fc79d13550753cc8356c6095a3967299d1350676
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.1.3-cp314-cp314-macosx_11_0_arm64.whl

Download URL goblin_ai-2.1.3-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
f90c0e04fc06ff31ab946629be25ca361a1fa1d1d8e9ff4f7c84858f5ce6dfd8
BLAKE2b-256 checksum
How to use checksums
c6ba74f5352df102faa94d9aa801a75419dd50fab3f98b68d3060f2d20425a1f
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.1.3-cp314-cp314-macosx_10_15_x86_64.whl

Download URL goblin_ai-2.1.3-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
31782621cf57c55fbe89913a32bd62205680f2eb91b5430c3c5a5b13b15f2d45
BLAKE2b-256 checksum
How to use checksums
1d5d322202768511205bc1d36620bd8eb3e43aeb7ed70489514e026693b78411
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.1.3-cp313-cp313-win_amd64.whl

Download URL goblin_ai-2.1.3-cp313-cp313-win_amd64.whl
Size 2.1 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
d314abede6f80517652bdd64940ea44b4984f5f749a820806cf2105a821de4f0
BLAKE2b-256 checksum
How to use checksums
730fee5b777f01c34d7f294e57d03b8362fbf0f84b0ce5854d70f349e4bcf2b5
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.1.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL goblin_ai-2.1.3-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
e6cfe8929a9f5827ac72d3a5b398c9aec48e3bd92bc36c8761a974b5c97d4d09
BLAKE2b-256 checksum
How to use checksums
cc484b1d16725f277b20ccfce8ae98ec03d6a0aa59b58a3a6169f3c33098a212
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.1.3-cp313-cp313-macosx_11_0_arm64.whl

Download URL goblin_ai-2.1.3-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
15f15d5ccfc24bbc63ee595c3ac13c0dfa29ec805e3d48203fcbdf53eb6c39ab
BLAKE2b-256 checksum
How to use checksums
592ca5d2ac4756ae42665febfa932773da10cbd8814c35fed90e752d7c868d41
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.1.3-cp313-cp313-macosx_10_13_x86_64.whl

Download URL goblin_ai-2.1.3-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
3a631dd0cec7b40b08fa3a40cc26c989869a682bcb5a82632ebd28fe98ca68a5
BLAKE2b-256 checksum
How to use checksums
a7afc31952242d51f8e43f98f787fec872673341d0698ff623ede6339f2f1f38
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.1.3-cp312-cp312-win_amd64.whl

Download URL goblin_ai-2.1.3-cp312-cp312-win_amd64.whl
Size 2.1 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
b8ddffa060b9ce84abdef2db8f46253f88f4fa009618111ae81c8b56f54282b3
BLAKE2b-256 checksum
How to use checksums
e53419f0c46eca1dc6c157db97a82cc0082374f560849c8466968d5083418c1f
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.1.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL goblin_ai-2.1.3-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
0348cf66ab6f91c8788dfafa61aa8e251e26dcc1d2f2a28b55d7f307fcb57558
BLAKE2b-256 checksum
How to use checksums
52f75472e621d4b5dfe16edfee810bcd3b871a13ca25edff7b070edb3db9f9c7
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.1.3-cp312-cp312-macosx_11_0_arm64.whl

Download URL goblin_ai-2.1.3-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
beef96d2fe049a3274b3caca34cd5afb0975bfb06743ceefb00dcb556883b3dd
BLAKE2b-256 checksum
How to use checksums
8d15b91f7c2fd63677debded0acf0a7874f5d326763ebc6a1a9fd82b84fac610
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.1.3-cp312-cp312-macosx_10_13_x86_64.whl

Download URL goblin_ai-2.1.3-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
7967a53aa28d26e112d19f93f1bb5a55edd78179a039d0bf3cd00930d7a9b00b
BLAKE2b-256 checksum
How to use checksums
c4d0bb8c2e60320238d87bc4a797965adcf245fe5e4a8c23e02fa736ca4ca47a
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.1.3-cp311-cp311-win_amd64.whl

Download URL goblin_ai-2.1.3-cp311-cp311-win_amd64.whl
Size 2.1 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
3d86b5b08d204dd5844e753a253ddfc2768fa8947d794ff18bfb3df48bd86602
BLAKE2b-256 checksum
How to use checksums
8df1f173aaf39d1ddae1ccd839cb90d79e6718f239f89650514eab5f8f1e076c
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.1.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL goblin_ai-2.1.3-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
7f521f8624663ece75b4850bf960c465d1b3a7e368f1098946bc7bfd613bf045
BLAKE2b-256 checksum
How to use checksums
d88ad7f35a85c5b542a8760b234e8313dcf2117fa62ebdd9f5d4e6158fbedff0
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.1.3-cp311-cp311-macosx_11_0_arm64.whl

Download URL goblin_ai-2.1.3-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
25ae6ee747ed9af4d78daa19340472d82b612d6e4103f0ac05bf9a08f5c6d5e5
BLAKE2b-256 checksum
How to use checksums
de637b47ae989a38b3f700a1df0181e0735c9b80d3d82917a05293a4bb07ffaf
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.1.3-cp311-cp311-macosx_10_9_x86_64.whl

Download URL goblin_ai-2.1.3-cp311-cp311-macosx_10_9_x86_64.whl
Size 2.2 MB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
dd8fd4d9fb59eb55158218f6dffe390746be43d536095b4cc2f14ea267f2b818
BLAKE2b-256 checksum
How to use checksums
d6f1d31348a7af63d3b090011ccba3a1457e04fbc8cbe4fb39ad26d41cc10a2e
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.1.3

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