Skip to main content
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

ParameterDescriptionData TypeRequiredRange
modelThe model to apply the downscale patch toMODELYes-
block_numberThe specific block number where downscaling will be applied (default: 3)INTNo1-32
downscale_factorThe factor by which to downscale the features (default: 2.0)FLOATNo0.1-9.0
start_percentThe starting point in the denoising process where downscaling begins (default: 0.0)FLOATNo0.0-1.0
end_percentThe ending point in the denoising process where downscaling stops (default: 0.35)FLOATNo0.0-1.0
downscale_after_skipWhether to apply downscaling after skip connections (default: True)BOOLEANNo-
downscale_methodThe interpolation method used for downscaling operationsCOMBONo”bicubic"
"nearest-exact"
"bilinear"
"area"
"bislerp”
upscale_methodThe interpolation method used for upscaling operationsCOMBONo”bicubic"
"nearest-exact"
"bilinear"
"area"
"bislerp”

Outputs

Output NameDescriptionData Type
modelThe modified model with downscale patch appliedMODEL
This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHub

Source fingerprint (SHA-256): ee6a1191bd753a669e676a58e2052ca4b47ac74d8f40df562df8550b0c71c3c2