fast-neural-style icon indicating copy to clipboard operation
fast-neural-style copied to clipboard

Problem with instance_norm models

Open elvisnava opened this issue 6 years ago • 12 comments

I used to be able to stylize images with all the provided models, but after a recent formatting and reinstallation (so library versions are probably different) I can't use the instance_norm models anymore.

There are no errors, except the output image is unrecognizable. An example on the chicago image: out

The eccv16 models are working normally.

elvisnava avatar Sep 20 '17 17:09 elvisnava

I had this exact problem. The solution for me was to downgrade CUDA from 9 to 7.5. Then I nuked my torch, lua, and related libs and reinstalled them. Afterwards it was a tad slower but it generated beautiful images. Even the eccv16 models looked better.

xcud avatar Oct 08 '17 03:10 xcud

I was using CUDA 8.0, I now tried using a Docker container with CUDA 7.5 and can confirm it works. Apparently CUDA 8.0 silently breaks whatever functionality the instance_norm models are using.

elvisnava avatar Oct 09 '17 13:10 elvisnava

Hi, I got the same problem and tried with CUDA 9 and CUDA 8, and I can't downgrade more the CUDA version because I'm running the code on a 16.04 ubuntu machine and there are not lower supported versions. Any clues or suggestion for me to do ?

gonzag avatar Oct 23 '17 18:10 gonzag

screenshot from 2017-10-23 14-23-33 CUDA 7.5 runs on Ubuntu 16.04

xcud avatar Oct 23 '17 19:10 xcud

I had exact same problem but solved now. I am using CUDA 8.0 and CUDNN 5.1. Update your torch instead of changing cuda or ubuntu version. launch this shell script 'update.sh' in your torch folder ex) ~/torch$sudo bash update.sh This worked on my machine.

sangjunnn avatar Oct 26 '17 17:10 sangjunnn

@sangjunnn Thank you so much. I spent a few hours today installing some docker images with cuda 7.5, it didn't work. But I tried your solution and it worked.

unrealwill avatar Oct 26 '17 20:10 unrealwill

@sangjunnn I did the same and my problem solved. thank you very much!

fatimashiri avatar Nov 03 '17 03:11 fatimashiri

Confirmed. @sangjunnn's solution is much better.

xcud avatar Nov 03 '17 13:11 xcud

IHMO, updating torch is in general one of the first things to try when having any problem with torch.

htoyryla avatar Nov 03 '17 13:11 htoyryla

@sangjunnn Using sudo in my case broke some permission levels; simply running bash update.sh did the trick for me.

joeylitalien avatar Nov 16 '17 07:11 joeylitalien

I experience the same problems, although I have already updated torch. However I have cudnn 7.0.5.15-1 installed alongside with cuda 9.1.

I also had to follow this workaround in order to get cudnn 7 running at all. In short, they propose to checkout a newer revision of the torch.cudnn package via git clone https://github.com/soumith/cudnn.torch.git -b **R6** && cd cudnn.torch && luarocks make cudnn-scm-1.rockspec

flaushi avatar Mar 14 '18 16:03 flaushi

I had exact same problem but solved now. I am using CUDA 8.0 and CUDNN 5.1. Update your torch instead of changing cuda or ubuntu version. launch this shell script 'update.sh' in your torch folder ex) ~/torch$sudo bash update.sh This worked on my machine.

thank you!

406410672 avatar Jul 09 '20 08:07 406410672