# Getting Started

Quick setup to run ComfyUI on fal.ai cloud GPUs from your local machine.

## What you need

- **API key**: get one at https://fal.ai/dashboard/keys
- **Endpoint**: ask your team lead (example: `my-team/comfy`)

## Mac

### 1. Download and extract

Download the zip your team lead sent you, extract it somewhere (e.g. Desktop).

### 2. Open a terminal in that folder

```
cd ~/Desktop/fal-comfyui
```

### 3. Launch

```
./run.sh
```

The first time, you'll be asked for:
- Your **API key** (paste it, it won't show — that's normal, just hit Enter)
- Your **endpoint** (e.g. `my-team/comfy`)

It'll auto-install Homebrew, `uv`, and `ffmpeg` if missing.

Then ComfyUI opens at http://localhost:8188.

> **Note:** The **first workflow run** takes ~5 minutes — the GPU runner needs to boot up and load models into memory. After that, it stays warm for 1 hour and runs are fast (seconds).

## Windows

### 1. Download and extract

Same as Mac — extract the zip somewhere.

### 2. Open a PowerShell or CMD in that folder

Right-click the `fal-comfyui` folder → **"Open in Terminal"** (or `cmd` / `powershell`).

### 3. Launch

Either:
- Double-click `run.bat`
- Or from the terminal: `.\run.ps1`

The first time, same prompts as Mac. Auto-installs `uv` and `ffmpeg` via `winget`.

> **Note:** You may need to allow scripts in PowerShell:
> ```
> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
> ```

## Daily use

Just run `./run.sh` (Mac) or `run.bat` (Windows). Config is saved — you won't be asked again unless you want to change the API key / endpoint.

## Key features

- **Output gallery**: http://localhost:8188/outputs — see all generated files with previews and download links
- **Video preview**: VHS LoadVideo nodes support advanced preview with frame trimming
- **Runner logs**: link shown at startup, lets you see your GPU runner's logs in real time

## Important

**Inputs and outputs are NOT persisted between sessions.** For security reasons:
- **Save your workflows locally** (File > Save) after each session
- **Download your outputs** before closing
- **Re-upload your input files** if you restart the proxy

Outputs stay on fal's CDN for 7 days from generation.
