Metadata-Version: 2.4
Name: mirage-landscape
Version: 0.1.0
Summary: Generate AI landscape images from the command line
License-Expression: MIT
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Requires-Dist: accelerate
Requires-Dist: click>=8.0
Requires-Dist: diffusers>=0.27
Requires-Dist: numpy>=1.24
Requires-Dist: pillow>=10.0
Requires-Dist: safetensors
Requires-Dist: torch>=2.0
Description-Content-Type: text/markdown

# 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)**
```bash
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:
```bash
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](https://pytorch.org/get-started/locally/) if unsure.

## Usage

```bash
# 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

```python
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
