> ## 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.

# AI Stream Pack

> The Livepeer ComfyUI-Stream-Pack is a suite of custom ComfyUI nodes for building real-time video and audio workflows using ComfyStream.

export const TableCell = ({children, align = "left", header = false, style = {}, className = "", ...rest}) => {
  const Component = header ? "th" : "td";
  return <Component className={className} style={{
    padding: "0.75rem 1rem",
    textAlign: align,
    border: header ? "none" : "1px solid var(--lp-color-border-default)",
    ...style
  }} {...rest}>
      {children}
    </Component>;
};

export const TableRow = ({children, header = false, hover = false, style = {}, className = "", ...rest}) => {
  const rowId = `table-row-${Math.random().toString(36).substr(2, 9)}`;
  return <>
      {hover && <style>{`
          #${rowId}:hover {
            background-color: var(--lp-color-bg-card);
          }
        `}</style>}
      <tr id={rowId} className={className} style={{
    ...header && ({
      backgroundColor: "var(--lp-color-accent-strong)",
      color: "var(--lp-color-on-accent)",
      fontWeight: "bold"
    }),
    ...style
  }} {...rest}>
        {children}
      </tr>
    </>;
};

export const StyledTable = ({children, variant = "default", style = {}, className = "", ...rest}) => {
  const wrapperVariants = {
    default: {
      border: "1px solid var(--lp-color-border-default)",
      backgroundColor: "var(--lp-color-bg-card)",
      overflow: "hidden"
    },
    bordered: {
      border: "2px solid var(--lp-color-accent)",
      backgroundColor: "var(--lp-color-bg-page)",
      overflow: "hidden"
    },
    minimal: {
      border: "none",
      backgroundColor: "transparent",
      overflow: "visible"
    }
  };
  return <div data-docs-styled-table-shell className={className} style={{
    width: "100%",
    padding: 0,
    margin: 0,
    ...wrapperVariants[variant],
    ...style
  }} {...rest}>
      <table data-docs-styled-table style={{
    width: "100%",
    borderCollapse: "collapse",
    borderSpacing: 0,
    margin: 0,
    backgroundColor: "transparent"
  }}>
        {children}
      </table>
    </div>;
};

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 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>AI Stream Pack extends ComfyUI with nodes that accept live video and audio inputs, enabling workflows that were previously impossible in standard ComfyUI batch mode.</Tip>
</CenteredContainer>

***

The Livepeer `ComfyUI-Stream-Pack` (`livepeer/ComfyUI-Stream-Pack`) is a suite of custom ComfyUI nodes for building real-time video and audio processing workflows with ComfyStream. Standard ComfyUI workflows operate on static images or pre-rendered video files. AI Stream Pack introduces node categories that accept live streams as first-class inputs, enabling the same node graph authoring experience for real-time pipelines.

<CustomDivider />

## Node Categories

The node pack uses three categories based on the role each node plays in a workflow:

<StyledTable variant="bordered">
  <thead>
    <TableRow header>
      <TableCell header>Category</TableCell>
      <TableCell header>Purpose</TableCell>
    </TableRow>
  </thead>

  <tbody>
    <TableRow>
      <TableCell>**Foundation Nodes**</TableCell>
      <TableCell>Introduce entirely new capabilities to ComfyUI that are otherwise impossible. Typically introduce new AI models or checkpoint types, or enable core functionality expanded by Light Nodes.</TableCell>
    </TableRow>

    <TableRow>
      <TableCell>**Light Nodes**</TableCell>
      <TableCell>Modify or enhance existing workflows by tweaking parameters or intermediate values in Foundation Nodes. Provide workflow insights, debug information, or variations of existing functionality.</TableCell>
    </TableRow>

    <TableRow>
      <TableCell>**Control Nodes**</TableCell>
      <TableCell>Connect external data sources and outputs to workflows. Load tensor data, process audio input, and stream outputs to Livepeer, WebRTC, or other real-time platforms.</TableCell>
    </TableRow>
  </tbody>
</StyledTable>

<CustomDivider />

## Control Nodes

Control Nodes are the input/output layer of a streaming workflow. The current pack ships two Control Nodes:

* **`LoadTensor`**: loads tensor data from a live stream for real-time processing. This is the entry point for video frames in a streaming workflow.
* **`LoadAudioTensor`**: processes real-time audio input, delivering audio data into the workflow for audio-aware pipelines.

Both nodes replace the static `Load Image` pattern used in batch ComfyUI workflows. In a streaming context, they receive frames from the ComfyStream server on each forward pass instead of reading from disk.

<Note>
  Foundation Nodes and Light Nodes are defined in the node pack architecture but have no shipped implementations in the current release. The Control Nodes (`LoadTensor`, `LoadAudioTensor`) are the active entry points for streaming workflows.
</Note>

<CustomDivider />

## Installation

The AI Stream Pack is installed as part of the ComfyStream setup. When ComfyStream is installed and its auxiliary custom nodes are copied into a ComfyUI workspace, the AI Stream Pack nodes become available in the ComfyUI node graph.

To install standalone:

```bash theme={"theme":{"light":"github-light","dark":"dark-plus"}}
cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/livepeer/ComfyUI-Stream-Pack.git
```

After restarting ComfyUI, the `LoadTensor` and `LoadAudioTensor` nodes appear in the node menu under the Livepeer category.

<CustomDivider />

## Using Stream Pack Nodes in a Workflow

A streaming workflow replaces the static `Load Image` node with `LoadTensor`. The rest of the workflow (samplers, ControlNet, VAE decode, etc.) is unchanged:

1. Add a `LoadTensor` node as the input source
2. Connect it to your img2img sampler or latent processing chain
3. Export the workflow in API format
4. Point ComfyStream at the exported JSON

ComfyStream's server intercepts the `LoadTensor` node at runtime and injects decoded video frames. The downstream nodes process each frame as they would a static image input, but the forward pass is called once per incoming frame, not once per workflow execution.

See <LinkArrow href="/v2/developers/build/ai-and-agents/realtime-ai/comfystream/workflow-authoring" label="Workflow Authoring" newline={false} /> for the full workflow setup and streaming server configuration.

<CustomDivider />

## Related Pages

Stream Pack nodes work inside ComfyStream workflows. See the [ComfyStream overview](/v2/developers/build/ai-and-agents/realtime-ai/ComfyStream/overview) for the full real-time pipeline architecture.

<CardGroup cols={2}>
  <Card title="Workflow Authoring" icon="workflow" href="/v2/developers/build/ai-and-agents/realtime-ai/comfystream/workflow-authoring" arrow horizontal>
    How to build and connect a ComfyUI workflow to a live video source with ComfyStream.
  </Card>

  <Card title="Real-Time AI Overview" icon="video" href="/v2/developers/build/ai-and-agents/realtime-ai/overview" arrow horizontal>
    Cascade architecture and how ComfyStream fits into the Livepeer pipeline.
  </Card>

  <Card title="ComfyStream as BYOC" icon="box" href="/v2/developers/build/ai-and-agents/realtime-ai/comfystream/comfystream-as-byoc" arrow horizontal>
    Registering a ComfyStream instance with a Livepeer Orchestrator.
  </Card>

  <Card title="PyTrickle Overview" icon="code" href="/v2/developers/build/ai-and-agents/realtime-ai/pytrickle/overview" arrow horizontal>
    Python SDK alternative for custom real-time processing without ComfyUI.
  </Card>
</CardGroup>
