ComfyUI Node

ApplyRAUNet

This node is used to enable generation at higher resolutions than a model was trained for with less artifacts or other negative effects. This is the advanced version with more tuneable parameters, use ApplyRAUNetSimple if this seems too complex. NOTE: Only supports SD1.x, SD2.x and SDXL.

By blepping·Created 2 years ago·Updated about a year ago· 125
ApplyRAUNet
  • model
  • MODEL
input_blocks3
output_blocks8
time_modepercent
start_time0.00
end_time0.45
upscale_mode
ca_start_time0.00
ca_end_time0.30
ca_input_blocks4
ca_output_blocks8
ca_upscale_mode
ca_downscale_modeadaptive_avg_pool2d
ca_downscale_factor2.0
two_stage_upscale_modedisabled
yaml_parameters
Categorymodel_patches/unet

Inputs (16)

NameTypeDefaultDescription
modelMODELModel to be patched with the RAUNet effect.
input_blocksSTRING3Comma-separated list of input Downsample blocks. Default is for SD 1.5. The corresponding valid block from output_blocks must be set along with input. Valid blocks for SD1.5: 3, 6, 9 Valid blocks for SDXL: 3, 6. Original Hidiffusion implementation uses 6 for SDXL.
output_blocksSTRING8Comma-separated list of output Upsample blocks. Default is for SD 1.5. The corresponding valid block from input_blocks must be set along with output. Valid blocks for SD1.5: 8, 5, 2 Valid blocks for SDXL: 5, 2. Original Hidiffusion implementation uses 2 for SDXL.
time_modeCOMBOpercentTime mode controls how to interpret the values in start_time and end_time.
start_timeFLOAT0.000–999Time normal RAUNet effects start applying - value is inclusive.
end_timeFLOAT0.450–999Time normal RAUNet effects end - value is inclusive.
upscale_modeCOMBOMethod used when upscaling latents in output Upscale blocks.
ca_start_timeFLOAT0.000–999Time normal cross-attention effects start applying - value is inclusive..
ca_end_timeFLOAT0.300–999Time normal cross-attention effects end - value is inclusive.
ca_input_blocksSTRING4Comma separated list of input cross-attention blocks. Default is for SD1.x, for SDXL you can try using 5 (or just disable it).
ca_output_blocksSTRING8Comma-separated list of output cross-attention blocks. Default is for SD1.x, for SDXL you can try using 4 (or just disable it).
ca_upscale_modeCOMBOMode used when upscaling latents in output cross-attention blocks.
ca_downscale_modeCOMBOadaptive_avg_pool2dMode used when downscaling latents in output cross-attention blocks (use avg_pool2d for normal Hidiffusion behavior). adaptive_avg_pool2d should be the same and also supports fractional scales.
ca_downscale_factorFLOAT2.0Factor to downscale with in cross-attention, 2.0 means downscale to half size. Must be an integer when using ca_downscale_mode avg_pool2d.
two_stage_upscale_modeCOMBOdisabledWhen upscaling in output Upscale blocks (non-NA), do half the upscale with this mode and half with the normal upscale mode. May produce a different effect, isn't necessarily better.
yaml_parametersoptSTRINGAllows specifying custom parameters via YAML. You can also override any of the normal parameters by key. See main README for possible options. Note: When specifying paramaters this way, there is very little error checking.

Outputs (1)

NameTypeDescription
MODELMODELModel patched with the RAUNet effect.