kaishengtai / neuralart

An implementation of the paper 'A Neural Algorithm of Artistic Style'.
MIT License
2.41k stars 353 forks source link

Issue: attempt to index global 'qtuiloader' (a nil value) #2

Closed LeapGamer closed 9 years ago

LeapGamer commented 9 years ago

I'm trying to run the software from command line on an AWS instance. Do I need X and a GUI in order to use it? I'm getting the following error:

ubuntu@ip-172-31-28-145:~/neuralart$ qlua main.lua --style style/monet.jpg --content examples/halfdome.jpg Unable to connect X11 server (continuing with -nographics) Using cunn backend qlua: not loading module qtgui (running with -nographics) qlua: qtwidget window functions will not be usable (running with -nographics) qtwidget window functions will not be usable (running with -nographics) qlua: not loading module qtuiloader (running with -nographics) qlua: /home/ubuntu/torch/install/share/lua/5.1/image/init.lua:1321: attempt to index global 'qtuiloader' (a nil value) stack traceback: [C]: in function '__index' /home/ubuntu/torch/install/share/lua/5.1/image/init.lua:1321: in function 'window' /home/ubuntu/torch/install/share/lua/5.1/image/init.lua:1276: in function 'display' main.lua:183: in main chunk

Thanks for making the code available, and great work!

soumith commented 9 years ago

you need an X server to display the images. if you dont need the display, you can disable it by commenting out the lines: https://github.com/kaishengtai/neuralart/blob/master/main.lua#L183 https://github.com/kaishengtai/neuralart/blob/master/main.lua#L204 https://github.com/kaishengtai/neuralart/blob/master/main.lua#L209

and running the script with: th --style style/monet.jpg --content examples/halfdome.jpg

kaishengtai commented 9 years ago

Thanks, Soumith!

LeapGamer commented 9 years ago

Thanks very much! That got it working :)

LeapGamer commented 9 years ago

Is it possible to process images larger than 500px wide? Is this a limitation of the model or is it something I can change?

soumith commented 9 years ago

@LeapGamer it's probably your GPU memory constraint?

LeapGamer commented 9 years ago

I'm able to do process large images (i don't get an error or anything), it just resizes the output down to 500px wide. I'd rather process them and keep the original size, if possible.

kaishengtai commented 9 years ago

@LeapGamer I added an option --size to set the image size. Use --size 0 to retain the original size of the content image.

LeapGamer commented 9 years ago

Awesome, thanks a ton! Here's a link to some of the stuff I've made so far: http://imgur.com/a/IHv70

jerryz1982 commented 9 years ago

output display can be turned off with --display_interval 0 now. this can bypass the issue described by the OP.