Caricature-Your-Face
Caricature-Your-Face copied to clipboard
RuntimeError: solve_cuda: U(4,4) is zero, singular U.
Hi, Just trying to test this, but I get the following issue:
./run.sh
Started Deformable Style Transfer
Settings content_path: data/content/barack_obama.jpg style_path: data/style/Vincent_van_Gogh/151.png content_pts_path: data/content/pts/barack_obama.txt style_pts_path: data/style/pts/151.txt output_dir: data/output/Vincent_van_Gogh output_prefix: barack_obama-151 im_size: 256 max_iter: 150 checkpoint_iter: 50 content_weight: 8.0 warp_weight: 0.5 reg_weight: 50.0 optim: sgd lr: 0.3 verbose: True save_intermediate: True save_extra: True
Optimizing at scale 1, image size (64, 64) STEP 000: Loss 7.949 = alphaLcontent 0.434 + Lstyle 4.580 + betaLwarp 2.935 + gamma*TV 0.000 Traceback (most recent call last): File "main.py", line 101, in
output = DST(initial_im, content_im_orig, style_im_orig, extractor, File "/home/nerdy/github/Caricature-Your-Face/styletransfer.py", line 143, in DST new_im, content_im_warp, warp_field = apply_warp(new_im, [src_Kpts_aug], [dst_Kpts_aug], device, sharp=sharp_warp, im2=content_im_warp) File "/home/nerdy/github/Caricature-Your-Face/warp.py", line 432, in apply_warp new_im, new_im2, warp_field = image_warp(new_im, dst, dst-src, device, sharp=sharp, img2=new_im2) File "/home/nerdy/github/Caricature-Your-Face/warp.py", line 86, in image_warp w, v = solve_interpolation(dst_pts, flow_pts, device) File "/home/nerdy/github/Caricature-Your-Face/warp.py", line 226, in solve_interpolation w_v, _ = torch.solve(rhs, lhs) RuntimeError: solve_cuda: U(4,4) is zero, singular U.
The last line changes. For example it could also be:
RuntimeError: solve_cuda: U(29,29) is zero, singular U.
@nerdyrodent same issue here, did you manage to solve it?
Same issue.... @nerdyrodent @alejandrosatis did you find a way to fix it?
In my case:
File "C:\Users\corra\myproject\venv\DST\main.py", line 102, in <module>
output = DST(initial_im, content_im_orig, style_im_orig, extractor,
File "C:\Users\corra\myproject\venv\DST\styletransfer.py", line 206, in DST
ell.backward()
File "C:\Users\corra\myproject\venv\lib\site-packages\torch\_tensor.py", line 255, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)
File "C:\Users\corra\myproject\venv\lib\site-packages\torch\autograd\__init__.py", line 147, in backward
Variable._execution_engine.run_backward(
RuntimeError: linalg_solve: U(384,384) is zero, singular U.