Code Monkey home page Code Monkey logo

Comments (4)

williamyang1991 avatar williamyang1991 commented on May 30, 2024

I think this is not a problem of the code.
It is the problem of package installtion.
You can search on Google with the key words like Your compiler (c++) is not compatible with the compiler Pytorch was built with for this platform to see if there are solutions.

For example, I found related issues here
rosinality/stylegan2-pytorch#220
NVIDIA/apex#974

from dualstylegan.

wonjunchoi-arc avatar wonjunchoi-arc commented on May 30, 2024

cartoon_transfer_53_081680_overview

Well, I solved the package installation problem as you told me, but the results keep coming out like the picture above.

Below is the output of the terminal after solving the package installation

(dualstylegan_env) [lucass@nipa2019-0211 DualStyleGAN]$ python style_transfer.py
Load options
align_face: False
content: ./data/content/081680.jpg
data_path: ./data/
exstyle_name: exstyle_code.npy
model_name: generator.pt
model_path: ./checkpoint/
name: cartoon_transfer
output_path: ./output/
preserve_color: False
style: cartoon
style_id: 1
truncation: 0.75
weight: [0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]


Loading pSp from checkpoint: ./checkpoint/encoder.pt
Load models successfully!
Generate images successfully!
Save images successfully!
(dualstylegan_env) [lucass@nipa2019-0211 DualStyleGAN]$ gcc --version
gcc (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

from dualstylegan.

williamyang1991 avatar williamyang1991 commented on May 30, 2024

I'm not sure what the problem is.
The second image is a pure reconstructed image by pSp encoder and StyleGAN, which is not related to DualStyleGAN.
Can you successfully generate images by StyleGAN in https://github.com/rosinality/stylegan2-pytorch?
If not, I think there is still something wrong with your enironment/model.

Maybe you can try style transfer with DualStyleGAN on the colab platform:
http://colab.research.google.com/github/williamyang1991/DualStyleGAN/blob/master/notebooks/inference_playground.ipynb

from dualstylegan.

huyen-spec avatar huyen-spec commented on May 30, 2024

This probably too late but I got the same issue as you when tried running the demo. The code executed successfully, but the returned images are just wrong. I am using pytorch 1.12 and cuda 11.3. The problem is probably with the pytorch native version of fused_leaky_relu, which seemed to return very small number. After replacing the function fused_leaky_relu with what this thread said:

rosinality/stylegan2-pytorch#81

I was able to get the ouput correctly. I think it has something to do with cuda version mismatch, since cuda 10 seemed to work, but anyway that was what helped solve my problem.

from dualstylegan.

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.