calculate-flops.pytorch
calculate-flops.pytorch copied to clipboard
Can this support StableDiffusion?
It is not easy, we need to change CNN batch to a dict.
if isinstance(input_sample, dict):
_ = flops_model(**input_sample)
else:
_ = flops_model(input_sample)
and change a lot of operators. becuase diffusers has different op name. and even different version has different op names. for example.
class Attention(nn.Module):