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.1.tar.gz (88.6 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.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mirage_landscape-0.1.1.tar.gz
  • Upload date:
  • Size: 88.6 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.1.tar.gz
Algorithm Hash digest
SHA256 a1a8cfe88d7babd5e31f85b6b5b22258ba325cb8f33fa2dcbcf0b2b3a84a097c
MD5 39cc29ab270e251bdfe69855378d959b
BLAKE2b-256 7c2337e03e0c08705558f4c247fb53261cc9e4cc749754da60e7a018926185b4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mirage_landscape-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4c73dd525d6ec43d4b4ccdf164b9ac2eeba446cf94d285d0012730b68c8ef684
MD5 e61fc9ff186cdbce4a59009935fbf637
BLAKE2b-256 ea19353c140071bc91cf551ef9e85e95b48cb3818351150c6748e7bd3df30ef8

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