axinc-ai / ailia-models

The collection of pre-trained, state-of-the-art AI models for ailia SDK
2k stars 318 forks source link

ADD lama #813

Open kyakuno opened 2 years ago

kyakuno commented 2 years ago

https://github.com/saic-mdal/lama

ooe1123 commented 2 years ago

fft_rfftn がonnxエクスポートに対応していないため、エクスポートできない

RuntimeError: Exporting the operator fft_rfftn to ONNX opset version 12 is not supported. Please feel free to request support or submit a pull request on PyTorch GitHub.

○ saicinpainting/training/modules/ffc.py

class FourierUnit(nn.Module):
    ...
    def forward(self, x):
        ...
        ffted = torch.fft.rfftn(x, dim=fft_dim, norm=self.fft_norm)
ooe1123 commented 2 years ago

DefaultInpaintingTrainingModule ├── BaseInpaintingTrainingModule   ├── generatoer = FFCResNetGenerator (saicinpainting/training/modules/ffc.py)     ├── model = FFC_BN_ACT       ├── ffc = FFC         ├── convg2g = SpectralTransform           ├── fe = FourieUnit

kyakuno commented 2 years ago

opset17でdftが入ったが、まだエクスポートには未対応。 https://github.com/pytorch/pytorch/blob/master/torch/onnx/symbolic_opset17.py