Skip to main content

Generate AI landscape images from the command line

Project description

mirage-landscape

Generate AI landscape images from the command line. Runs fully offline after the first use.

mirage -n 3 -o ~/Desktop
  saved → /Users/mike/Desktop/landscape_20240506_142301_001.png
  saved → /Users/mike/Desktop/landscape_20240506_142341_002.png
  saved → /Users/mike/Desktop/landscape_20240506_142421_003.png

How it works

  1. DDPM (crab27/ddpm-landscape) generates a 256×256 landscape using DPM-Solver++ in 20 steps
  2. Real-ESRGAN 4× upscales it to 1024×1024
  3. Lanczos resize to your target resolution (default 3840×2160)

Model weights download automatically on first run and are cached in ~/.cache/mirage/.

Install

CPU / Apple Silicon (MPS)

pip install mirage-landscape

NVIDIA GPU (CUDA) — install PyTorch with CUDA support first, then install the package so pip doesn't overwrite it with the CPU build:

pip install torch --index-url https://download.pytorch.org/whl/cu124
pip install mirage-landscape

Replace cu124 with your CUDA version (cu118, cu121, etc.). Check pytorch.org if unsure.

Usage

# One 4K image in the current directory
mirage

# Multiple images to a specific folder
mirage -n 5 -o ~/Pictures/landscapes

# Skip upscaling for a quick 256×256 preview
mirage --no-upscale

# Custom resolution
mirage --resolution 2560x1440

# Reproducible output
mirage --seed 42

# Fewer steps = faster, slightly lower quality
mirage --steps 10

All options

Option Default Description
-o, --output . Output directory
-n, --count 1 Number of images
--steps 20 Denoising steps
--no-upscale off Skip Real-ESRGAN (outputs 256×256)
--resolution 3840x2160 Output resolution as WxH
--seed random Fix seed for reproducibility

Python API

from mirage import generate

paths = generate(output_dir="~/Pictures", count=3, seed=42)

Requirements

  • Python 3.10+
  • ~3 GB disk for model weights (cached after first download)
  • CUDA GPU recommended; Apple Silicon (MPS) and CPU also supported

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

mirage_landscape-0.1.0.tar.gz (88.2 kB view details)

Uploaded Source

Built Distribution

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

mirage_landscape-0.1.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file mirage_landscape-0.1.0.tar.gz.

File metadata

  • Download URL: mirage_landscape-0.1.0.tar.gz
  • Upload date:
  • Size: 88.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mirage_landscape-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dd97dc1fc67f88f87f0705dd8f771a7695d043331dd8749821dfb7c7b3cf897d
MD5 b8d8ad150cb3299880f4d8dde78a2877
BLAKE2b-256 d6bdb16a8654ad0984a400e8bba8b1d85b8a7b1894e6e9a6c2096cab69f699d1

See more details on using hashes here.

File details

Details for the file mirage_landscape-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mirage_landscape-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mirage_landscape-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9783958b7a193a3432c5c953e53fd8e4998776055763846e5557a51ea39d37c9
MD5 6d17024ff0e36d3a2e1f6e7e18533627
BLAKE2b-256 24deffd11c7f4d8a54715fc00e839b96f5b0bc786369f93ad22b4d9f9f536c96

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