GeoVectorMatrix / Dif-Fusion

Codes for the Dif-Fusion model
96 stars 4 forks source link

What are the parameters for pretrained model when run t_fusion.py to obtain the fused color images #11

Closed chaossshan closed 7 months ago

chaossshan commented 7 months ago

when i run pretrained model, this problem occur: x = layer(torch.cat((x, feats.pop()), dim=1), t) RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 36 but got size 35 for tensor number 1 in the list.

i guess this probably the problem of the config in fusion_test.json, but I don't know which one exactly(channels?)

GeoVectorMatrix commented 7 months ago

It seems that the input size matters. I don't have large GPUs on hand, I juts tested with 160*160 cropped input, and there's no problem.

I think resizing the image may help with various inputs.

The code for crop(in 160*160 test) is here: https://github.com/GeoVectorMatrix/Dif-Fusion/blob/2e7b4fcda579fa0008ef7db45857d418c35fa25c/data/VIDataset.py#L60