Git Product home page Git Product logo

Comments (3)

LaurentMazare avatar LaurentMazare commented on June 2, 2024

Did you install libtorch manually or rely on the automated install? See this readme for more details.
The automated install will default to the cpu version, you can get it to install the cuda enabled libtorch by setting TORCH_CUDA_VERSION to something like cu117 though in the long run it's probably better/more stable to go through the manual install process.

from diffusers-rs.

mushogenshin avatar mushogenshin commented on June 2, 2024

Thanks a lot for your pointer. I installed using automated script to get the models converted at first, then after having read the README at tch-rs I've followed the instructions there to config the proper env vars. I think I almost got it working except for encountering two linker errors:

Creating library E:\projects\diffusers-rs\target\debug\examples\stable_diffusion.lib and object E:\projects\diffusers-rs\target\debug\examples\stable_diffusion.exp
          libtorch_sys-1e4b51fbd71aba4d.rlib(torch_api.o) : error LNK2001: unresolved external symbol __imp___tls_index_?init@?1??lazy_init_num_threads@internal@at@@YAXXZ@4_NA
          libtorch_sys-1e4b51fbd71aba4d.rlib(torch_api.o) : error LNK2001: unresolved external symbol __imp___tls_offset_?init@?1??lazy_init_num_threads@internal@at@@YAXXZ@4_NA
          E:\projects\diffusers-rs\target\debug\examples\stable_diffusion.exe : fatal error LNK1120: 2 unresolved externals


warning: `diffusers` (example "stable-diffusion") generated 17 warnings
error: could not compile `diffusers` due to previous error; 17 warnings emitted

(I switched to libtorch debug build after seeing the release build generated even more errors, as I recall). But I think this linking issue would belong to the tch-rs repo instead, and actually not a biggie for me, as I can wait until things get more stable.

This is an image I generated using CPU for fun:

"A rusty intimidating robot holding a fire torch, Gustave Courbet"
A rusty intimidating robot holding a fire torch, Gustave Courbet

from diffusers-rs.

LaurentMazare avatar LaurentMazare commented on June 2, 2024

Re the tls error, this has indeed already been reported on the tch side here. It seems that the issue is at the libtorch/Visual Studio level stackoverflow post. The quickest workaround is probably to use an older version of visual studio if you can.

from diffusers-rs.

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.