> ## Documentation Index
> Fetch the complete documentation index at: https://runcrate.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Video Rendering on Cloud GPU

> Deploy a GPU instance, install AnimateDiff, and render AI-generated videos on cloud hardware.

export const RuncrateStyles = () => {
  if (typeof document !== 'undefined' && !document.getElementById('runcrate-overrides')) {
    const s = document.createElement('style');
    s.id = 'runcrate-overrides';
    s.textContent = `
      /* Match Runcrate's rounding scale (--radius: 0.75rem) */
      .rounded-sm { border-radius: 0.5rem !important; }   /* 8px */
      .rounded-md { border-radius: 0.625rem !important; } /* 10px */
      .rounded-lg { border-radius: 0.75rem !important; }  /* 12px */
      .rounded-l-sm { border-top-left-radius: 0.5rem !important; border-bottom-left-radius: 0.5rem !important; }
      .rounded-r-sm { border-top-right-radius: 0.5rem !important; border-bottom-right-radius: 0.5rem !important; }
      .rounded-l-md { border-top-left-radius: 0.625rem !important; border-bottom-left-radius: 0.625rem !important; }
      .rounded-r-md { border-top-right-radius: 0.625rem !important; border-bottom-right-radius: 0.625rem !important; }
      .rounded-l-lg { border-top-left-radius: 0.75rem !important; border-bottom-left-radius: 0.75rem !important; }
      .rounded-r-lg { border-top-right-radius: 0.75rem !important; border-bottom-right-radius: 0.75rem !important; }

      /* Cards: never pure white in light mode */
      .card { background-color: #fcfcfc !important; border-radius: 0.75rem !important; }
      html.dark .card { background-color: #141414 !important; }

      /* Docs hero box */
      .rc-hero { background-color: #fcfcfc; border: 1px solid #e0e0e0; }
      html.dark .rc-hero { background-color: #141414; border-color: #242424; }
      html.dark .rc-hero h1 { color: #f5f5f5; }

      /* Runcrate scrollbar — thin, transparent track, hide-until-hover thumb */
      ::-webkit-scrollbar { width: 6px; height: 6px; background-color: transparent; }
      ::-webkit-scrollbar-track { background-color: transparent; }
      ::-webkit-scrollbar-thumb { background-color: rgba(155, 155, 155, 0.5); border-radius: 10px; transition: opacity 0.3s ease; opacity: 0; }
      ::-webkit-scrollbar-thumb:hover { background-color: rgba(155, 155, 155, 0.7); }
      *:hover::-webkit-scrollbar-thumb,
      *:focus::-webkit-scrollbar-thumb,
      *:active::-webkit-scrollbar-thumb { opacity: 1; }
      * { scrollbar-width: thin; scrollbar-color: rgba(155, 155, 155, 0.5) transparent; }
    `;
    document.head.appendChild(s);
  }
  return null;
};

<RuncrateStyles />

Render AI-generated videos on a dedicated cloud GPU. AnimateDiff turns text prompts into animated sequences. Both tools are VRAM-hungry — a cloud GPU avoids tying up your local machine.

## GPU requirements

| Tool                 | Min VRAM | Recommended GPU |
| -------------------- | -------- | --------------- |
| AnimateDiff (SD 1.5) | 12 GB    | RTX 4090        |
| AnimateDiff (SDXL)   | 20 GB    | RTX 4090        |
| CogVideoX            | 24 GB+   | A100 80 GB      |

***

## 1. Deploy a GPU instance

```bash theme={"theme":"github-dark"}
runcrate instances create --name video-gen --gpu RTX4090 --template ubuntu-devbox
runcrate instances status video-gen
```

## 2. Install AnimateDiff

```bash theme={"theme":"github-dark"}
runcrate ssh video-gen -- "
  cd /workspace &&
  git clone https://github.com/guoyww/AnimateDiff.git &&
  cd AnimateDiff &&
  pip install -r requirements.txt
"
```

Download the motion module and base model:

```bash theme={"theme":"github-dark"}
runcrate ssh video-gen -- "
  cd /workspace/AnimateDiff &&
  mkdir -p models/Motion_Module models/StableDiffusion &&
  huggingface-cli download guoyww/animatediff-motion-adapter-v1-5-3 \
    --local-dir models/Motion_Module &&
  huggingface-cli download runwayml/stable-diffusion-v1-5 \
    --local-dir models/StableDiffusion/stable-diffusion-v1-5
"
```

## 3. Generate a video

```bash theme={"theme":"github-dark"}
runcrate ssh video-gen -- "cd /workspace/AnimateDiff && python -m scripts.animate \
  --config configs/prompts/v3/v3-1-T2V.yaml \
  --pretrained_model_path models/StableDiffusion/stable-diffusion-v1-5 \
  --L 16 --W 512 --H 512"
```

## 4. Download rendered videos

```bash theme={"theme":"github-dark"}
runcrate cp video-gen:/workspace/AnimateDiff/output/ ./rendered-videos/
```

## Monitor GPU during rendering

```bash theme={"theme":"github-dark"}
runcrate ssh video-gen -- nvidia-smi
runcrate ssh video-gen -- "ls -la /workspace/AnimateDiff/output/"
```

## Tips

* AnimateDiff at 512x512 with 16 frames fits on an RTX 4090. Higher resolutions need an A100.
* Use `--L 32` for longer animations. Memory scales linearly with frame count.
* Convert frames to video with ffmpeg: `ffmpeg -framerate 12 -i frame_%04d.png -c:v libx264 output.mp4`.
* Attach a volume to persist models across sessions.

## Cleanup

```bash theme={"theme":"github-dark"}
runcrate instances delete video-gen
```
