calculate-flops.pytorch icon indicating copy to clipboard operation
calculate-flops.pytorch copied to clipboard

Library `diffusers` is not supported yet

Open XianweiC opened this issue 1 year ago • 2 comments

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))

XianweiC avatar Nov 22 '23 07:11 XianweiC