> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-mintlify-b90d3c69.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# TorchCompileModel - ComfyUI Built-in Node Documentation

> Complete documentation for the TorchCompileModel node in ComfyUI. Learn its inputs, outputs, parameters and usage.

TorchCompileModel 节点对模型应用 PyTorch 编译以优化其性能。它会创建输入模型的副本，并使用指定的后端将其包装为 PyTorch 的编译功能。这可以提高模型在推理过程中的执行速度。

## 输入

| 参数   | 描述                                 | 数据类型   | 是否必填 | 范围                           |
| ---- | ---------------------------------- | ------ | ---- | ---------------------------- |
| `模型` | 需要被编译和优化的模型                        | MODEL  | 是    | -                            |
| `后端` | 用于优化的 PyTorch 编译后端（默认值："inductor"） | STRING | 是    | "inductor"<br />"cudagraphs" |

## 输出

| 输出名称 | 描述                   | 数据类型  |
| ---- | -------------------- | ----- |
| `模型` | 已应用 PyTorch 编译的编译后模型 | MODEL |

> 本文档由 AI 生成。如果您发现任何错误或有改进建议，欢迎贡献！ [在 GitHub 上编辑](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/TorchCompileModel/zh.md)

***

**Source fingerprint (SHA-256):** `923e71b528e6e53468916f74c2a02924bf51738f29e36638312c6da6357fcedb`
