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
- DDPM (
crab27/ddpm-landscape) generates a 256×256 landscape using DPM-Solver++ in 20 steps - Real-ESRGAN 4× upscales it to 1024×1024
- 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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1a8cfe88d7babd5e31f85b6b5b22258ba325cb8f33fa2dcbcf0b2b3a84a097c
|
|
| MD5 |
39cc29ab270e251bdfe69855378d959b
|
|
| BLAKE2b-256 |
7c2337e03e0c08705558f4c247fb53261cc9e4cc749754da60e7a018926185b4
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c73dd525d6ec43d4b4ccdf164b9ac2eeba446cf94d285d0012730b68c8ef684
|
|
| MD5 |
e61fc9ff186cdbce4a59009935fbf637
|
|
| BLAKE2b-256 |
ea19353c140071bc91cf551ef9e85e95b48cb3818351150c6748e7bd3df30ef8
|