Giter VIP home page Giter VIP logo

Comments (14)

jiupinjia avatar jiupinjia commented on May 30, 2024

Hi, thanks for your feedback. It seems you are running in a CPU mode. Do you have a cuda device available?

from stylized-neural-painting.

wby920920 avatar wby920920 commented on May 30, 2024

Yes, I found the same error when I started using gpu. Then I changed the device in the demo to cpu and the same error occurred.

from stylized-neural-painting.

wby920920 avatar wby920920 commented on May 30, 2024

嗨,谢谢您的反馈。看来您正在CPU模式下运行。您有可用的cuda设备吗?

image

from stylized-neural-painting.

jiupinjia avatar jiupinjia commented on May 30, 2024

It seems you are using a pretty old version of PyTorch. I just tried to downgrade my PyTorch and saw the same error as you did. I finally found that the problem lies in the inconsistency of the data type (cuda float32 vs cuda float 64) between the two variables (img_batch and G_final_pred_canvas). I have made a minor update on the initializing of the img_batch, and this time I believe the problem has been fixed. You git-clone to your local machine and try it again. Please tell me whether it works fine this time. Thanks!

from stylized-neural-painting.

wby920920 avatar wby920920 commented on May 30, 2024

It seems you are using a pretty old version of PyTorch. I just tried to downgrade my PyTorch and saw the same error as you did. I finally found that the problem lies in the inconsistency of the data type (cuda float32 vs cuda float 64) between the two variables (img_batch and G_final_pred_canvas). I have made a minor update on the initializing of the img_batch, and this time I believe the problem has been fixed. You git-clone to your local machine and try it again. Please tell me whether it works fine this time. Thanks!

Thank you very much for your reply. But it is a pity that I cloned your project again, and the same error still appears. I am trying to update the pytorch installation package to the latest version.

from stylized-neural-painting.

jiupinjia avatar jiupinjia commented on May 30, 2024

Can you please show me your error report this time?

from stylized-neural-painting.

wby920920 avatar wby920920 commented on May 30, 2024

Can you please show me your error report this time?

Hello, first of all thank you for paying attention to my question. When I use the old version (pytorch1.2), an error occurs as shown in the figure. When I use the latest version of pytorch (1.7), the code can run smoothly.
image

from stylized-neural-painting.

jiupinjia avatar jiupinjia commented on May 30, 2024

It is weird that an older version of PyTorch still has such an error since I have made updates accordingly.
Can you show me what your line 241 of utils.py looks like? Thanks.

from stylized-neural-painting.

wby920920 avatar wby920920 commented on May 30, 2024

It is weird that an older version of PyTorch still has such an error since I have made updates accordingly.
Can you show me what your line 241 of utils.py looks like? Thanks.

I found that the project I downloaded is different from the 241 line on github. After I modified it, it can run with the old version of Pytorch. I am very sorry for the inconvenience caused by my negligence.

from stylized-neural-painting.

jiupinjia avatar jiupinjia commented on May 30, 2024

That's fine! Pls feel free to reach out to me if you have any further questions. Cheers!

from stylized-neural-painting.

JohnHack8 avatar JohnHack8 commented on May 30, 2024

Good afternoon, your project is very interesting. I am new to computer vision, so there are a few questions.

  1. The project will not work without CUDA, using CPU only?
  2. What is an 'painter' in this line: from painter import *? Some kind of library?
    Thanks.

from stylized-neural-painting.

jiupinjia avatar jiupinjia commented on May 30, 2024

Hi @JohnHack8, Thanks for your question. I strongly recommend using a GPU since the computation would be heavy for a CPU. The painter module imported here is exactly from the file painter.py. We need some prefined classes and functions to help with such a task. Thanks!

from stylized-neural-painting.

jiupinjia avatar jiupinjia commented on May 30, 2024

Hi @JohnHack8, PyTorch-CPU mode is now supported! You can try out on your local machine without any GPU cards. But please note that you still need PyTorch installed if you run on CPU mode. You can simply follow the instructions in the README file and the code will automatically detect whether there will be any GPU cards available. If there is no GPU, the code will run on the CPU automatically. Please let me know if there is any problem. Thanks!

from stylized-neural-painting.

JohnHack8 avatar JohnHack8 commented on May 30, 2024

Hi jiupinjia. It's great news. Thanks!

from stylized-neural-painting.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.