calculate-flops.pytorch
calculate-flops.pytorch copied to clipboard
Library `diffusers` is not supported yet
I was trying to calculate the flops of InstructPix2Pix from huggingface using the method described in the README, but I got this error:
ValueError: Library `diffusers` is not supported yet, please open an issue on GitHub for us to add support.
The code that I use:
from calflops import calculate_flops_hf
H, W = 128, 512
model_name = "timbrooks/instruct-pix2pix"
flops, macs, params = calculate_flops_hf(model_name=model_name, input_shape=(batch_size, 3, H, W))
print("%s FLOPs:%s MACs:%s Params:%s \n" %(model_name, flops, macs, params))