-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
Certain segmentation masks seem to make the stylization process fail.
Here's the output:
eric@desktop:~/FastPhotoStyle$ python3 demo.py --content_image_path cont_img.png --content_seg_path cont_seg.png --style_image_path styl_img.png --style_seg_path styl_seg.png --output_image_path test.png --fast
Resize image: (1280,760)->(1280,760)
Resize image: (2048,1024)->(960,480)
Intel MKL ERROR: Parameter 4 was incorrect on entry to SLASCL.
Intel MKL ERROR: Parameter 4 was incorrect on entry to SLASCL.
Elapsed time in stylization: 0.494351
Traceback (most recent call last):
File "demo.py", line 49, in <module>
device=args.device
File "/home/eric/FastPhotoStyle/process_stylization.py", line 122, in stylization
stylized_img = stylization_module.transform(cont_img, styl_img, cont_seg, styl_seg)
File "/home/eric/FastPhotoStyle/photo_wct.py", line 35, in transform
csF4 = self.__feature_wct(cF4, sF4, cont_seg, styl_seg)
File "/home/eric/FastPhotoStyle/photo_wct.py", line 108, in __feature_wct
tmp_target_feature = self.__wct_core(cFFG, sFFG)
File "/home/eric/FastPhotoStyle/photo_wct.py", line 149, in __wct_core
s_u, s_e, s_v = torch.svd(styleConv, some=False)
RuntimeError: MAGMA gesdd : the updating process of SBDSDC did not converge (error: 14) at /opt/conda/conda-bld/pytorch_1544197736932/work/aten/src/THC/generic/THCTensorMathMagma.cu:383
I tried reverting back to the scipy gesvd algorithm for singular value decomposition, however, the matrix appears to have infinite values.
I've also tried several conda environments with different combinations of Python/CUDA/Torch as #13 mentions it might be an environment issue.
Interestingly, if I revert to CUDA 9.2 (the last version compatible w my RTX card), the code fails on the line before:
File "/home/eric/FastPhotoStyle/photo_wct.py", line 148, in __wct_core
styleConv = torch.mm(styl_feat, styl_feat.t()).div(sFSize[1] - 1)
RuntimeError: invalid argument 3: divide by zero at /opt/conda/conda-bld/pytorch_1532575968863/work/aten/src/THC/generic/THCTensorMathPairwise.cu:88
This might explain those infinite values?
phmalek
Metadata
Metadata
Assignees
Labels
No labels