diffusion_models.models.openai_unet.QKVAttention¶
- class diffusion_models.models.openai_unet.QKVAttention(*args, **kwargs)[source]¶
Bases:
Module
A module which performs QKV attention.
- __init__(*args, **kwargs)¶
Methods
__init__
(*args, **kwargs)count_flops
(model, _x, y)A counter for the thop package to count the operations in an attention operation.
forward
(qkv)Apply QKV attention.