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

# PatchModelAddDownscale - ComfyUI Built-in Node Documentation

> PatchModelAddDownscale (Kohya Deep Shrink) 通过在选择的目标块处缩小中间特征，然后将其缩放回原始尺寸，从而将 Kohya Deep Shrink 技术应用于模型。

PatchModelAddDownscale (Kohya Deep Shrink) 通过在选择的目标块处缩小中间特征，然后将其缩放回原始尺寸，从而将 Kohya Deep Shrink 技术应用于模型。缩小仅发生在去噪过程的选定阶段，这可以降低处理成本，同时使最终结果接近原始结果。

## 输入

| 参数 | 描述 | 数据类型 | 必填 | 范围 |
| - | - | - | - | - |
| `模型` | 要应用降采样补丁的模型 | MODEL | 是 | - |
| `层编号` | 将应用降采样的具体块编号（默认值：3） | INT | 是 | 1-32 |
| `收缩系数` | 用于对特征进行降采样的因子（默认值：2.0） | FLOAT | 是 | 0.1-9.0 |
| `开始百分比` | 去噪过程中开始降采样的起点（默认值：0.0） | FLOAT | 是 | 0.0-1.0 |
| `结束百分比` | 去噪过程中停止降采样的终点（默认值：0.35） | FLOAT | 是 | 0.0-1.0 |
| `跳过后收缩` | 是否在跳跃连接之后应用降采样（默认值：True） | BOOLEAN | 是 | - |
| `收缩算法` | 用于降采样操作的插值方法（默认值："bicubic"） | COMBO | 是 | "bicubic"<br />"nearest-exact"<br />"bilinear"<br />"area"<br />"bislerp" |
| `放大方法` | 用于上采样操作的插值方法（默认值："bicubic"） | COMBO | 是 | "bicubic"<br />"nearest-exact"<br />"bilinear"<br />"area"<br />"bislerp" |

仅当当前去噪步骤落在由 `start_percent` 和 `end_percent` 定义的范围内，并且仅在由 `block_number` 选择的块上时，才会应用降采样补丁。启用 `downscale_after_skip` 时，补丁会在跳跃连接之后应用；禁用时，则会在跳跃连接之前应用。之后，特征会被缩放回其原始尺寸，但仅当当前特征尺寸不再与降采样前记录的尺寸匹配时才会这样做。

参数 `block_number`、`start_percent`、`end_percent` 和 `downscale_after_skip` 在节点界面中标记为高级选项。

## 输出

| 输出名称 | 描述 | 数据类型 |
| - | - | - |
| `model` | 已应用降采样补丁的修改后模型 | MODEL |

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

***

**Source fingerprint (SHA-256):** `aa9434a521ab585b290a3bd8db804469bd3bb02103a0d830b6be6eb8e8c26a5e`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.