Nodes/comfyui_jankhidiffusion/ApplyMSWMSAAttention
ComfyUI Node

ApplyMSWMSAAttention

This node applies an attention patch which _may_ slightly improve quality especially when generating at high resolutions. It is a large performance increase on SD1.x, may improve performance on SDXL. This is the advanced version of the node with more parameters, use ApplyMSWMSAAttentionSimple 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
ApplyMSWMSAAttention
  • model
  • MODEL
input_blocks1,2
middle_blocks
output_blocks9,10,11
time_modepercent
start_time0.00
end_time1.00
yaml_parameters
Categorymodel_patches/unet

Inputs (8)

NameTypeDefaultDescription
input_blocksSTRING1,2Comma-separated list of input blocks to patch. Default is for SD1.x, you can try 4,5 for SDXL
middle_blocksSTRINGComma-separated list of middle blocks to patch. Generally not recommended.
output_blocksSTRING9,10,11Comma-separated list of output blocks to patch. Default is for SD1.x, you can try 3,4,5 for SDXL
time_modeCOMBOpercentTime mode controls how to interpret the values in start_time and end_time.
start_timeFLOAT0.000–999Time the MSW-MSA attention effect starts applying - value is inclusive.
end_timeFLOAT1.000–999Time the MSW-MSA attention effect ends - value is inclusive.
modelMODELModel to patch with the MSW-MSA attention effect.
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 MSW-MSA attention effect.