EfficientDM icon indicating copy to clipboard operation
EfficientDM copied to clipboard

Dimension error

Open yhwangs opened this issue 1 year ago • 1 comments

There is dimension error. How can I resolve this? I think it's because context_dim in configs(yaml file) of cin256-v2 model is 512. What is the shape of cali_y[:32] in your code?

File "./quant_scripts/quant_layer.py", line 372, in forward out = self.fwd_func(input, weight, bias, **self.fwd_kwargs) RuntimeError: mat1 and mat2 shapes cannot be multiplied (3072x64 and 512x384)

Occured at In 'quantize_ldm_naive.py', _ = qnn(cali_images[:32].to(device),cali_t[:32].to(device),cali_y[:32].to(device))

yhwangs avatar Apr 23 '24 05:04 yhwangs

In the first step, when sampling data for calibration, you need to store image, timestep, and y, but the 'collect_input_4_calib.py' code only stores the image. I arbitrarily modified it. Can you confirm again if the data saved after sampling includes all three variables?

yhwangs avatar Apr 23 '24 08:04 yhwangs