LLFlow
LLFlow copied to clipboard
onnx support
I wonder if the excellent model is able to converted into onnx ?
Thanks for your interest in our work.
While I am unfamiliar with onnx, I believe the model can be converted, at least for inference. The model is purely built on Pytorch, and we do not need customized CUDA operation.
For training, we also utilize the vanilla auto propagation provided by PyTorch. We utilize a flag to control the behavior of each layer in our model.
When I try to export onnxtorch.onnx. export (model. netG, input_dummy, f, inputnames, outputnames. opset_version=11)
or use the summary in torchsummary (model. netG)
, the following error will appear, indicating that x is empty in ConditionEncoder. py line 96. This means that there is no input information throughout the forward process. When I try to obtain input information using test. py, I still cannot import normally in forward mode. May I ask how the author should transmit the input information to the network if they want to operate normally in these two ways
File "/root/miniconda3/lib/python3.8/site-packages/torch/cuda/amp/autocast_mode.py", line 141, in decorate_autocast
return func(*args, **kwargs)
File "/root/autodl-tmp/Model/LLFlow/code/models/modules/LLFlow_arch.py", line 97, in forward
return self.normal_flow(gt, lr, epses=epses, lr_enc=lr_enc, add_gt_noise=add_gt_noise, step=step,
File "/root/autodl-tmp/Model/LLFlow/code/models/modules/LLFlow_arch.py", line 121, in normal_flow
lr_enc = self.rrdbPreprocessing(lr)
File "/root/autodl-tmp/Model/LLFlow/code/models/modules/LLFlow_arch.py", line 182, in rrdbPreprocessing
rrdbResults = self.RRDB(lr, get_steps=True)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/root/autodl-tmp/Model/LLFlow/code/models/modules/ConditionEncoder.py", line 96, in forward
raw_low_input = x[:, 0:3].exp()
TypeError: 'NoneType' object is not subscriptable
我也遇到了相同的问题,请问您解决了吗