GaParmar / img2img-turbo

One-step image-to-image with Stable Diffusion turbo: sketch2image, day2night, and more
MIT License
1.69k stars 190 forks source link

Qualcomm deployment of cycleGan-turbo #85

Open ouyangjiacs opened 2 months ago

ouyangjiacs commented 2 months ago

Thank you very much for this great work. I would like to ask something about the Qualcomm deployment of cycleGan-turbo. I wonder if you have done it and can provide some experience: Do you encounter errors when converting Unet to DLC models?(The dlcs of the other three modules run correctly),The following are the problems that occurred when Unet tried different solutions: (1) When using snpe-adapted pytorch version 1.13.1: it is found that if the model is directly converted to onnx, a prompt will appear that the operator is not supported: Exporting the operator 'aten::scaled_dot_product_attention' to ONNX opset version 14 is not supported (2) Upgrade torch, onnx and other libraries to the latest version: The model can be successfully transferred to onnx, but an error will be reported when transferring to dlc: ValueError: input_dim command input name(s) not found: input_0, input_1, input_2 (3)I used your model and your image scale to test, but the test results are wrong and the color of the picture is abnormal. (4)Without onnx, use pt file to convert dlc, and core dump will occur when running Have you encountered any of these problems? Any suggestions how to fix this? Thank you very much~

my unet model: input_data = ( torch.randn([1, 4, 128, 128]), torch.randint(0, 1000, [1], dtype=torch.int32), torch.randn([1, 77, 1024]), )