-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The results aren't coming out well #37
Comments
I think this is not a problem of the code. For example, I found related issues here |
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 Loading pSp from checkpoint: ./checkpoint/encoder.pt |
I'm not sure what the problem is. Maybe you can try style transfer with DualStyleGAN on the colab platform: |
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. |
As shown in the picture above, the result of style_transfer.py does not come out properly. Why is that?
The output of the terminal is as follows
(dualstylegan_env) [lucass@nipa2019-0211 DualStyleGAN]$ python style_transfer.py
/home/lucass/anaconda3/envs/dualstylegan_env/lib/python3.8/site-packages/torch/utils/cpp_extension.py:266: UserWarning:
!! WARNING !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (c++) is not compatible with the compiler Pytorch was
built with for this platform, which is g++ on linux. Please
use g++ to to compile your extension. Alternatively, you may
compile PyTorch from source using c++, and then you can also use
c++ to compile your extension.
See https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md for help
with compiling PyTorch from source.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! WARNING !!
warnings.warn(WRONG_COMPILER_WARNING.format(
/home/lucass/anaconda3/envs/dualstylegan_env/lib/python3.8/site-packages/torch/utils/cpp_extension.py:266: UserWarning:
!! WARNING !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (c++) is not compatible with the compiler Pytorch was
built with for this platform, which is g++ on linux. Please
use g++ to to compile your extension. Alternatively, you may
compile PyTorch from source using c++, and then you can also use
c++ to compile your extension.
See https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md for help
with compiling PyTorch from source.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! WARNING !!
warnings.warn(WRONG_COMPILER_WARNING.format(
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: 2
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]$
The text was updated successfully, but these errors were encountered: