Comments (4)
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.
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.
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.
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)
- RuntimeError: Error(s) in loading state_dict for Discriminator: HOT 10
- weight 设定有什么说法么? HOT 2
- Problems with training on Google Colab - FIXED HOT 1
- RuntimeError: input must be contiguous HOT 2
- pre-train ConditionalDiscriminator HOT 1
- 生成图片的脖子有痕迹 HOT 1
- Error occured when pretraining dualstylegan HOT 2
- Train with w-plus pSp encoder. HOT 2
- the gpu memory usage of finetuning dualstylegan on 8 gpus HOT 2
- Apart from Human images
- Freeze/crash in web demo on reconstruct_face()
- issue while installing HOT 18
- Fantastic work, I was wondering if I can still run this in my pc which has no GPU. HOT 4
- Fine-Tune DualStyleGAN on Target Domain auto terminate HOT 1
- Training fails HOT 2
- 訓練問題 HOT 5
- finetune_stylegan.py error - TypeError: 'tuple' object is not callable HOT 2
- train_sampler.py - IndexError
- 有没有更简单的app.py
- Error on notebook
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dualstylegan.