Skip to main content
This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHub
The PatchModelAddDownscale node implements Kohya Deep Shrink functionality by applying downscaling and upscaling operations to specific blocks in a model. It reduces the resolution of intermediate features during processing and then restores them to their original size, which can improve performance while maintaining quality. The node allows precise control over when and how these scaling operations occur during the model’s execution.

Inputs

ParameterData TypeRequiredRangeDescription
modelMODELYes-The model to apply the downscale patch to
block_numberINTNo1-32The specific block number where downscaling will be applied (default: 3)
downscale_factorFLOATNo0.1-9.0The factor by which to downscale the features (default: 2.0)
start_percentFLOATNo0.0-1.0The starting point in the denoising process where downscaling begins (default: 0.0)
end_percentFLOATNo0.0-1.0The ending point in the denoising process where downscaling stops (default: 0.35)
downscale_after_skipBOOLEANNo-Whether to apply downscaling after skip connections (default: True)
downscale_methodCOMBONo”bicubic"
"nearest-exact"
"bilinear"
"area"
"bislerp”
The interpolation method used for downscaling operations
upscale_methodCOMBONo”bicubic"
"nearest-exact"
"bilinear"
"area"
"bislerp”
The interpolation method used for upscaling operations

Outputs

Output NameData TypeDescription
modelMODELThe modified model with downscale patch applied