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

# Improve Origami AI Performance: Rendering, AI, and TTS

> Speed up Origami AI video rendering, reduce AI inference time, optimize TTS, and manage memory with these hardware-aware performance tips.

Origami AI runs entirely on your device — there is no render farm or cloud processing happening in the background. That means the speed you get depends directly on your hardware. The tips below help you get the best possible experience from whatever machine you are using, whether you are on a high-end workstation or a mid-range laptop.

***

## Video Rendering

Rendering is the most resource-intensive operation in Origami AI. These steps have the biggest impact on render speed and reliability.

<Steps>
  <Step title="Use 720p instead of 1080p">
    Dropping from 1080p to 720p is the single most effective way to speed up rendering. The output is still high quality and perfectly suited for most platforms. Change the resolution in the export settings before you start a render.
  </Step>

  <Step title="Split long projects into smaller segments">
    Very long projects hold a large amount of data in memory during rendering, which can cause slowdowns or crashes. Split your project into shorter segments — render each one separately, then combine them if needed.
  </Step>

  <Step title="Simplify slide transitions">
    Complex transition effects require more processing per frame. Switching to simple cuts or basic fades significantly reduces render time on machines without a dedicated GPU.
  </Step>

  <Step title="Close other browser tabs during rendering">
    Every open tab consumes CPU and memory. Close any tabs you do not need before starting a render to give Origami AI as many resources as possible.
  </Step>

  <Step title="Run via Docker for better resource isolation">
    Docker provides more predictable resource allocation than running directly in the browser. If you are doing frequent or long renders, this is worth setting up:

    ```bash theme={null}
    docker compose up --build
    ```

    The app will be available at **[http://localhost:3000](http://localhost:3000)**.
  </Step>
</Steps>

<Tip>
  If a render fails partway through, open the browser console (`F12` → **Console** tab) and look for FFmpeg error messages. These logs pinpoint exactly where the render broke down — for example, a missing audio file, a codec error, or a memory allocation failure — and make troubleshooting much faster.
</Tip>

***

## AI Model Response Time

Local AI inference speed depends on your GPU's VRAM and compute capability. These adjustments can make a meaningful difference.

* **Use smaller, faster models.** The most impactful change you can make is choosing a lighter model. **Gemma 2 2B** and **Llama 3.2 1B** are significantly faster than 3B models and work well for narration scripts and general text tasks.
* **Filter to f16 precision models.** In **Settings → WebLLM**, set the precision filter to `f16`. F16 models use approximately half the VRAM of their F32 counterparts, which means faster loading and lower memory pressure — especially on integrated GPUs.
* **Process slides in batches.** Rather than queuing every slide for AI generation at once, send a few at a time. This keeps the model from holding a large working set in memory and gives you a chance to review output as it comes in.
* **Use a cloud API if local inference is too slow.** Connect an OpenAI-compatible provider in **Settings → API**. Cloud inference has no local GPU requirement and responds quickly regardless of your hardware.

***

## TTS Performance

Text-to-speech generation is CPU and memory intensive. These two changes have the biggest effect on TTS speed.

* **Switch to q4 quantization.** Go to **Settings → TTS Model** and change the quantization from `q8` to `q4`. The `q4` setting generates audio much faster and produces acceptable quality for most use cases. Switch back to `q8` only when you need the highest possible audio fidelity.
* **Generate audio slide by slide on slower machines.** If you are on a machine with limited CPU or memory, avoid generating audio for all slides at once. Process one or a few slides at a time to keep the browser responsive and prevent timeouts.

***

## Memory and Storage

Running out of memory or disk space causes crashes, failed downloads, and corrupted exports. Keep these limits in mind.

* **Limit open browser tabs.** Each tab uses GPU and system memory. During heavy tasks like rendering or model inference, close everything except Origami AI.
* **Clear browser cache regularly.** Over time, cached model files, blobs, and site data accumulate. Clear them periodically in DevTools (`F12`) → **Application** → **Storage** → **Clear site data** to reclaim space and prevent storage quota errors.
* **Plan for 50 GB or more of free disk space** if you want to cache multiple large AI models locally. A single model can range from \~800 MB to \~4 GB. If disk space is limited, stick to one or two smaller models and use a remote API for the rest.
* **Close other applications before intensive tasks.** Video rendering, model inference, and TTS generation all benefit from having as much system RAM available as possible. Quit other memory-heavy apps before starting these operations.

***

## Screen Recording Performance

Screen recording with auto-zoom is lightweight compared to rendering, but these adjustments help on constrained machines.

* **Reduce zoom intensity settings.** Lower zoom intensity values mean less aggressive canvas transforms, which reduces CPU load during recording playback and post-processing.
* **Use tab capture instead of desktop capture.** Capturing a single browser tab is lighter on CPU than capturing your entire desktop or an application window. Select **Tab** as the capture source in the recording setup to reduce system load, especially during long recordings.
