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

# ComfyStream Quickstart

> Run ComfyStream on RunPod, Docker, or local install. First real-time AI effect on a webcam in fifteen minutes.

export const CenteredContainer = ({children, maxWidth = "800px", padding = "0", preset = "default", width = "", minWidth = "", marginRight = "", marginBottom = "", textAlign = "", style = {}, className = "", ...rest}) => {
  const presets = {
    default: {},
    fitContent: {
      width: "fit-content",
      minWidth: "fit-content"
    },
    readable70: {
      width: "70%",
      minWidth: "fit-content"
    },
    readable80: {
      width: "80%",
      minWidth: "fit-content"
    },
    readable90: {
      width: "90%"
    },
    wide900: {
      maxWidth: "900px"
    }
  };
  const presetStyle = presets[preset] || presets.default;
  return <div className={className} style={{
    maxWidth: presetStyle.maxWidth || maxWidth,
    margin: "0 auto",
    padding: padding,
    ...presetStyle.width ? {
      width: presetStyle.width
    } : {},
    ...presetStyle.minWidth ? {
      minWidth: presetStyle.minWidth
    } : {},
    ...width ? {
      width
    } : {},
    ...minWidth ? {
      minWidth
    } : {},
    ...marginRight ? {
      marginRight
    } : {},
    ...marginBottom ? {
      marginBottom
    } : {},
    ...textAlign ? {
      textAlign
    } : {},
    ...style
  }} {...rest}>
      {children}
    </div>;
};

export const CustomDivider = ({color = "var(--lp-color-border-default)", middleText = "", spacing = "default", style = {}, className = "", ...rest}) => {
  const spacingPresets = {
    default: {
      margin: "24px 0"
    },
    overlap: {
      margin: "-1rem 0 -1rem 0"
    },
    tight: {
      margin: "0 0 -1rem 0"
    },
    section: {
      margin: "0 0 -2rem 0"
    },
    sectionOverlap: {
      margin: "-1rem 0 -2rem 0"
    },
    deepOverlap: {
      margin: "-1rem 0 -1.5rem 0"
    }
  };
  const spacingStyle = spacingPresets[spacing] || spacingPresets.default;
  return <div role="separator" aria-orientation="horizontal" className={className} style={{
    display: "flex",
    alignItems: "center",
    ...spacingStyle,
    fontSize: style?.fontSize || "16px",
    height: "fit-content",
    ...style
  }} {...rest}>
      <span style={{
    marginRight: "var(--lp-spacing-px-8)",
    opacity: 0.2
  }}>
        <Icon icon="/snippets/assets/logos/Livepeer-Logo-Symbol-Theme.svg" />
      </span>
      <div style={{
    flex: 1,
    height: "1px",
    background: "var(--lp-color-border-default)",
    opacity: 0.4
  }}></div>
      {middleText && <>
          <Icon icon="circle" size={2} />
          <span style={{
    margin: "0 8px",
    fontWeight: "bold",
    color: color,
    opacity: 0.7
  }}>
            {middleText}
          </span>
          <Icon icon="circle" size={2} />
        </>}
      <div style={{
    flex: 1,
    height: "1px",
    background: "var(--lp-color-border-default)",
    opacity: 0.4
  }}></div>
      <span style={{
    marginLeft: "var(--lp-spacing-px-8)",
    opacity: 0.2
  }}>
        <span style={{
    display: "inline-block",
    transform: "scaleX(-1)"
  }}>
          <Icon icon="/snippets/assets/logos/Livepeer-Logo-Symbol-Theme.svg" />
        </span>
      </span>
    </div>;
};

export const LinkArrow = ({href, label, description, newline = true, borderColor, className = '', style = {}, ...rest}) => {
  const linkArrowStyle = {
    display: 'inline-flex',
    alignItems: 'center',
    justifyContent: 'center',
    gap: "var(--lp-spacing-1)",
    width: 'fit-content',
    ...borderColor && ({
      borderColor
    })
  };
  return <span className={className} style={style} {...rest}>
      {newline && <br />}
      <span style={linkArrowStyle}>
        <a href={href} target="_blank" rel="noopener noreferrer">
          {label}
        </a>
        <Icon icon="arrow-up-right" size={14} color="var(--lp-color-accent)" />
      </span>
      {description && description}
      {description && <div style={{
    height: "var(--lp-spacing-3)"
  }} />}
    </span>;
};

<CenteredContainer preset="readable90">
  <Tip>RunPod, Docker, or local install. First real-time AI effect on a webcam in fifteen minutes. NVIDIA GPU required, Linux only.</Tip>
</CenteredContainer>

***

By the end of this quickstart you'll have a ComfyStream instance running with a StreamDiffusion workflow applied to your webcam in near real-time. The final section covers how to connect that instance to the Livepeer Network as a BYOC capability.

Three deployment paths fit different starting points. Pick one.

| Path          | Best for                        | Requires                     |
| ------------- | ------------------------------- | ---------------------------- |
| RunPod        | Fastest start, no local GPU     | RunPod account               |
| Docker        | Local GPU or owned cloud server | Docker + NVIDIA GPU, Linux   |
| Local install | Existing ComfyUI setup          | Miniconda, NVIDIA GPU, Linux |

<CustomDivider />

## Required Tools

ComfyStream requires an NVIDIA GPU with 12 GB VRAM minimum (16 GB recommended). The server component is Linux-only; Windows and macOS host the browser client only.

VRAM source: the <LinkArrow href="/v2/developers/build/ai-and-agents/model-support" label="model support" newline={false} />. CUDA 12.0+ required; current releases target CUDA 12.8 with NVIDIA driver 570.124.06 or later.

Browser: Chrome or Firefox for the ComfyStream UI.

<CustomDivider />

## RunPod Path

The fastest start. RunPod hosts the GPU; the browser does the rest.

<Steps>
  <Step title="Deploy the ComfyStream template">
    Open the `livepeer-comfystream` template in the RunPod marketplace and select a GPU pod. An RTX A4000 or A40 is a reasonable starting point for StreamDiffusion workflows.

    Click **Deploy** and wait for the pod status to show `Running`.
  </Step>

  <Step title="Connect to the pod">
    Click **Connect** in the RunPod panel. ComfyStream exposes two HTTP services on the pod:

    * Port `8188`: ComfyUI interface
    * Port `8889`: ComfyStream WebRTC server

    Open the HTTP service on port `8889`. The ComfyStream browser UI loads with a camera input selector and a workflow panel.
  </Step>
</Steps>

Skip to <LinkArrow href="#connect-a-stream" label="Connect a stream" newline={false} />.

## Docker Path

For a local GPU or a cloud server you control.

<Steps>
  <Step title="Pull the image">
    ```bash theme={"theme":{"light":"github-light","dark":"dark-plus"}}
    docker pull livepeer/comfystream
    ```
  </Step>

  <Step title="Run the container">
    ```bash theme={"theme":{"light":"github-light","dark":"dark-plus"}}
    docker run --gpus all \
      -p 8188:8188 \
      -p 8889:8889 \
      livepeer/comfystream
    ```

    The minimum flags above start the server. Production deployments add workspace and model volume mounts; the full options are in the ComfyStream Docker reference at `docs.comfystream.org`.
  </Step>

  <Step title="Open WebRTC ports">
    On a remote server, allow inbound and outbound UDP traffic on ports `1024-65535`. WebRTC peer connections fail without this.

    For environments where only a subset of UDP ports is available, pass `--media-ports 1024,1025,...` to the server command to restrict the range.
  </Step>

  <Step title="Open the UI">
    Open `http://localhost:8889` (local) or your server's public IP on port `8889`. The ComfyStream UI loads.
  </Step>
</Steps>

Skip to <LinkArrow href="#connect-a-stream" label="Connect a stream" newline={false} />.

## Local Install Path

For an existing ComfyUI setup or anyone wanting a Python environment to inspect.

<Steps>
  <Step title="Create a conda environment">
    ```bash theme={"theme":{"light":"github-light","dark":"dark-plus"}}
    conda create -n comfystream python=3.12
    conda activate comfystream
    ```
  </Step>

  <Step title="Install ComfyStream">
    ```bash theme={"theme":{"light":"github-light","dark":"dark-plus"}}
    pip install git+https://github.com/livepeer/comfystream.git
    ```
  </Step>

  <Step title="Install auxiliary custom nodes">
    For standalone ComfyStream (not inside an existing ComfyUI install), copy the auxiliary custom nodes into your ComfyUI `custom_nodes` folder. The exact list is in the `livepeer/comfystream` README.
  </Step>

  <Step title="Download models">
    ```bash theme={"theme":{"light":"github-light","dark":"dark-plus"}}
    python src/comfystream/scripts/setup_models.py --workspace /path/to/ComfyUI
    ```
  </Step>

  <Step title="Start the server">
    ```bash theme={"theme":{"light":"github-light","dark":"dark-plus"}}
    python server/app.py --workspace /path/to/ComfyUI
    ```

    The server starts on port `8889`. Open `http://localhost:8889` in a browser.
  </Step>
</Steps>

<CustomDivider />

## Workflow Loading

<Steps>
  <Step title="Pick a starter workflow">
    In the ComfyStream UI, open the workflow panel and choose a StreamDiffusion SD 1.5 starter from the selector. The repository ships a set of pre-configured starters in the `workflows/` directory; the StreamDiffusion SD 1.5 path is the lightest and compiles fastest.
  </Step>

  <Step title="Select the camera input">
    Choose your webcam from the camera input dropdown. The browser will request camera permission.
  </Step>

  <Step title="Run the pipeline">
    Click **Run**. First run triggers TensorRT compilation, which takes between two and five minutes for SD 1.5. Subsequent runs load immediately. Compilation progress streams to the terminal where the server is running.
  </Step>
</Steps>

<CustomDivider />

## Pipeline Verification

After compilation completes, the ComfyStream UI shows your webcam feed with the workflow effect applied in near real-time. Expected result: a transformed webcam input (style transfer, depth-mapped effects, or other visual processing depending on the loaded workflow).

If only the raw webcam feed appears without transformation, check:

* GPU VRAM is not exhausted (`nvidia-smi`)
* The workflow compiled without error (server logs)
* The workflow nodes reference models that have been downloaded

<CustomDivider />

## Common Errors

<AccordionGroup>
  <Accordion title="WebRTC negotiation fails">
    UDP port range blocked. On a remote server, allow UDP `1024-65535` inbound and outbound. For restricted environments, pass `--media-ports` to constrain the range.
  </Accordion>

  <Accordion title="TensorRT compilation hangs past ten minutes">
    The first compilation can take up to ten minutes for StreamDiffusion. Past that, check `nvidia-smi` for OOM, server logs for compilation errors, and confirm the GPU has at least 12 GB VRAM available.
  </Accordion>

  <Accordion title="Workflow fails to load with format error">
    The workflow was saved in default ComfyUI format. Re-export in API format: enable Developer Mode in ComfyUI settings, then use **Save (API Format)**.
  </Accordion>

  <Accordion title="Frame rate below 5 fps">
    Common causes: ControlNet stack too heavy, resolution too high, or model not TensorRT-compiled. Try a Lightning or LCM variant of the base model, drop to 512x512 input, and confirm TensorRT compilation completed.
  </Accordion>

  <Accordion title="Camera permission denied">
    The browser blocked camera access. Check site permissions in browser settings. ComfyStream needs `getUserMedia` access; HTTP works on `localhost` but requires HTTPS for remote IPs.
  </Accordion>
</AccordionGroup>

<CustomDivider />

## Network Connection

A local ComfyStream instance is a working real-time AI pipeline. Deploying it on the Livepeer Network, so other applications can call it and the operator earns fees, takes one of two paths.

| Path         | What it does                                               | When to use                                          |
| ------------ | ---------------------------------------------------------- | ---------------------------------------------------- |
| Daydream API | Use the hosted ComfyStream infrastructure                  | You want a managed surface without operating compute |
| BYOC worker  | Register your ComfyStream instance as a network capability | You want to operate the compute and earn fees        |

For the Daydream path, see the Daydream documentation under <LinkArrow href="/v2/developers/navigator" label="solutions paths" newline={false} />.

For the BYOC path, ComfyStream is already PyTrickle-integrated (Phase 4). The `livepeer/comfystream` image registers directly as a BYOC capability on an Orchestrator. The full setup is in <LinkArrow href="/v2/developers/build/ai-and-agents/realtime-ai/comfystream/comfystream-as-byoc" label="ComfyStream as BYOC" newline={false} />.

<CustomDivider />

## Production-Ready Pipelines

ComfyStream supports the following pipeline types in production (Phase 4, January 2026):

* **StreamDiffusion**: real-time style transfer and image-to-image on live video
* **StreamDiffusion V2**: second-generation diffusion pipeline; supports video-to-video and image-to-image
* **SuperResolution**: real-time video upscaling
* **AudioTranscription + SRT**: real-time captions embedded in video output
* **Text data-channel output**: structured text output (e.g. transcription) alongside video

<CustomDivider />

You have a working ComfyStream pipeline processing live video. The [workflow authoring](/v2/developers/build/ai-and-agents/realtime-ai/ComfyStream/workflow-authoring) page covers building custom workflows, and [ComfyStream as BYOC](/v2/developers/build/ai-and-agents/realtime-ai/ComfyStream/ComfyStream-as-byoc) covers registering your pipeline on the network.

## Next Steps

<CardGroup cols={2}>
  <Card title="Workflow Authoring" icon="diagram-project" href="/v2/developers/build/ai-and-agents/realtime-ai/comfystream/workflow-authoring">
    Build a custom workflow, configure StreamDiffusion, tune for latency.
  </Card>

  <Card title="ComfyStream as BYOC" icon="cube" href="/v2/developers/build/ai-and-agents/realtime-ai/comfystream/comfystream-as-byoc">
    Register your instance as a BYOC capability on the network.
  </Card>

  <Card title="BYOC Quickstart" icon="rocket" href="/v2/developers/build/compute/byoc/byoc-quickstart">
    The general BYOC path for non-ComfyUI workloads.
  </Card>

  <Card title="docs.comfystream.org" icon="book" href="https://docs.comfystream.org">
    Canonical install reference and hardware deep-dive.
  </Card>
</CardGroup>
