Skip to content
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

Windows 10 help #38

Open
mflux opened this issue Jan 16, 2021 · 14 comments
Open

Windows 10 help #38

mflux opened this issue Jan 16, 2021 · 14 comments

Comments

@mflux
Copy link

mflux commented Jan 16, 2021

Hello, I saw this on Two Minute Papers and was very interested in trying it out.

  1. Is there a prebuilt binary for Windows? Most average people don't use linux/unix. It would allow many more people to experience this work in a platform they already run.
  2. What is xhost? This doesn't seem like an existing command on Windows. Searching this shows up as valid commands in cygwin. Is the build only for *nix environments?
  3. The documentation says an Nvidia Docker installation is required. https://github.com/NVIDIA/nvidia-docker according to this, Windows version does not exist. How are other people building this for Windows then?

Thanks!

@justinjohn0306
Copy link

Hello, I saw this on Two Minute Papers and was very interested in trying it out.

  1. Is there a prebuilt binary for Windows? Most average people don't use linux/unix. It would allow many more people to experience this work in a platform they already run.
  2. What is xhost? This doesn't seem like an existing command on Windows. Searching this shows up as valid commands in cygwin. Is the build only for *nix environments?
  3. The documentation says an Nvidia Docker installation is required. https://github.com/NVIDIA/nvidia-docker according to this, Windows version does not exist. How are other people building this for Windows then?

Thanks!

check out my PR repo for Windows 10

@videoprice
Copy link

fused_bias_act.cu
W:/AISCRIPT/StyleFlow-Windows-10-master/dnnlib/tflib/ops/fused_bias_act.cu(9): fatal error C1083: Cannot open include file: 'tensorflow/core/framework/op.h': No such file or directory

Hello, I saw this on Two Minute Papers and was very interested in trying it out.

  1. Is there a prebuilt binary for Windows? Most average people don't use linux/unix. It would allow many more people to experience this work in a platform they already run.
  2. What is xhost? This doesn't seem like an existing command on Windows. Searching this shows up as valid commands in cygwin. Is the build only for *nix environments?
  3. The documentation says an Nvidia Docker installation is required. https://github.com/NVIDIA/nvidia-docker according to this, Windows version does not exist. How are other people building this for Windows then?

Thanks!

check out my PR repo for Windows 10

Hi can you help me with this error:

fused_bias_act.cu
W:/AISCRIPT/StyleFlow-Windows-10-master/dnnlib/tflib/ops/fused_bias_act.cu(9): fatal error C1083: Cannot open include file: 'tensorflow/core/framework/op.h': No such file or directory

@justinjohn0306
Copy link

justinjohn0306 commented Jan 17, 2021 via email

@videoprice
Copy link

videoprice commented Jan 17, 2021

Thanks a lot. It's already installed and path is set, but have this error. Here is full log:

(styleflow5) PS W:\AISCRIPT\StyleFlow-Windows-10-master> python main.py
2021-01-17 16:11:10.588114: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
----------------- Options ---------------
batchSize: 1
checkpoints_dir: ./checkpoints
dataroot: ./data/datasetX
gpu_ids: 0
max_result_snapshots: 30
model: xxxx
name: XXXX
network_pkl: gdrive:networks/stylegan2-ffhq-config-f.pkl
only_for_test: ...
phase: test
----------------- End -------------------
Loading networks from "gdrive:networks/stylegan2-ffhq-config-f.pkl"...
2021-01-17 16:11:20.559632: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2021-01-17 16:11:20.592534: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll
2021-01-17 16:11:20.595004: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties:
name: GeForce RTX 2080 major: 7 minor: 5 memoryClockRate(GHz): 1.8
pciBusID: 0000:73:00.0
2021-01-17 16:11:20.595266: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
2021-01-17 16:11:20.936125: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_100.dll
2021-01-17 16:11:21.278834: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_100.dll
2021-01-17 16:11:21.465039: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library curand64_100.dll
2021-01-17 16:11:21.827512: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusolver64_100.dll
2021-01-17 16:11:22.157121: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusparse64_100.dll
2021-01-17 16:11:22.529820: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll
2021-01-17 16:11:22.530531: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0
2021-01-17 16:11:24.477700: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-01-17 16:11:24.477940: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165] 0
2021-01-17 16:11:24.479202: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0: N
2021-01-17 16:11:24.482136: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1304] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 6306 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2080, pci bus id: 0000:73:00.0, compute capability: 7.5)
Setting up TensorFlow plugin "fused_bias_act.cu": Preprocessing... Failed!
Traceback (most recent call last):
File "main.py", line 365, in
ex = ExWindow(opt)
File "main.py", line 40, in init
self.EX = Ex(opt)
File "main.py", line 70, in init
self.init_deep_model(opt)
File "main.py", line 105, in init_deep_model
self.model = Build_model(self.opt)
File "W:\AISCRIPT\StyleFlow-Windows-10-master\utils.py", line 195, in init
_G, _D, Gs = pretrained_networks.load_networks(network_pkl)
File "W:\AISCRIPT\StyleFlow-Windows-10-master\pretrained_networks.py", line 76, in load_networks
G, D, Gs = pickle.load(stream, encoding='latin1')
File "W:\AISCRIPT\StyleFlow-Windows-10-master\dnnlib\tflib\network.py", line 297, in setstate
self._init_graph()
File "W:\AISCRIPT\StyleFlow-Windows-10-master\dnnlib\tflib\network.py", line 154, in _init_graph
out_expr = self._build_func(*self.input_templates, **build_kwargs)
File "", line 491, in G_synthesis_stylegan2
File "", line 455, in layer
File "", line 99, in modulated_conv2d_layer
File "", line 68, in apply_bias_act
File "W:\AISCRIPT\StyleFlow-Windows-10-master\dnnlib\tflib\ops\fused_bias_act.py", line 68, in fused_bias_act
return impl_dict[impl](x=x, b=b, axis=axis, act=act, alpha=alpha, gain=gain)
File "W:\AISCRIPT\StyleFlow-Windows-10-master\dnnlib\tflib\ops\fused_bias_act.py", line 122, in _fused_bias_act_cuda
cuda_kernel = _get_plugin().fused_bias_act
File "W:\AISCRIPT\StyleFlow-Windows-10-master\dnnlib\tflib\ops\fused_bias_act.py", line 16, in _get_plugin
return custom_ops.get_plugin(os.path.splitext(file)[0] + '.cu')
File "W:\AISCRIPT\StyleFlow-Windows-10-master\dnnlib\tflib\custom_ops.py", line 132, in get_plugin
_run_cmd(_prepare_nvcc_cli('"%s" --preprocess -o "%s" --keep --keep-dir "%s"' % (cuda_file, tmp_file, tmp_dir)))
File "W:\AISCRIPT\StyleFlow-Windows-10-master\dnnlib\tflib\custom_ops.py", line 72, in _run_cmd
raise RuntimeError('NVCC returned an error. See below for full command line and output log:\n\n%s\n\n%s' % (cmd, output))
RuntimeError: NVCC returned an error. See below for full command line and output log:

nvcc "W:\AISCRIPT\StyleFlow-Windows-10-master\dnnlib\tflib\ops\fused_bias_act.cu" --preprocess -o "C:\Users\video\AppData\Local\Temp\tmpcvbgwypq\fused_bias_act_tmp.cu" --keep --keep-dir "C:\Users\video\AppData\Local\Temp\tmpcvbgwypq" --disable-warnings --include-path "C:\Users\video\MiniConda3\envs\styleflow5\lib\site-packages\tensorflow_core\include" --include-path "C:\Users\video\MiniConda3\envs\styleflow5\lib\site-packages\tensorflow_core\include\external\protobuf_archive\src" --include-path "C:\Users\video\MiniConda3\envs\styleflow5\lib\site-packages\tensorflow_core\include\external\com_google_absl" --include-path "C:\Users\video\MiniConda3\envs\styleflow5\lib\site-packages\tensorflow_core\include\external\eigen_archive" --compiler-bindir "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/bin/HostX64/x64" 2>&1

fused_bias_act.cu
W:/AISCRIPT/StyleFlow-Windows-10-master/dnnlib/tflib/ops/fused_bias_act.cu(9): fatal error C1083: Cannot open include file: 'tensorflow/core/framework/op.h': No such file or directory

@videoprice
Copy link

Finaly, I run this script. Problem is : Need to install tensorflow 1.14 not 1.15

@justinjohn0306
Copy link

Finaly, I run this script. Problem is : Need to install tensorflow 1.14 not 1.15

it's already inside env_windows.yml
check out my PR repo for Windows 10
Capture

@Arvindia
Copy link

Finaly, I run this script. Problem is : Need to install tensorflow 1.14 not 1.15

it's already inside env_windows.yml
check out my PR repo for Windows 10
Capture

Please provide link of your repo.

@justinjohn0306
Copy link

Finaly, I run this script. Problem is : Need to install tensorflow 1.14 not 1.15

it's already inside env_windows.yml
check out my PR repo for Windows 10
Capture

Please provide link of your repo.

https://github.com/justinjohn0306/StyleFlow-Windows-10

@provostm
Copy link

provostm commented Jan 26, 2021

Finaly, I run this script. Problem is : Need to install tensorflow 1.14 not 1.15

Exactly as mentionned in https://github.com/NVlabs/stylegan2 :

We recommend TensorFlow 1.14, which we used for all experiments in the paper, but TensorFlow 1.15 is also supported on Linux. TensorFlow 2.x is not supported.
On Windows you need to use TensorFlow 1.14, as the standard 1.15 installation does not include necessary C++ headers.

@dmalyavin
Copy link

Any way to get this to run on a 3090? seems like nether the local install nor docker recognizes the 3090 GPU. I am not an expert though.. so maybe I am missing something.

@provostm
Copy link

@dmalyavin Look at this issue about RTX 3080, you might find a solution : #34

@ZapUser77
Copy link

Finaly, I run this script. Problem is : Need to install tensorflow 1.14 not 1.15

it's already inside env_windows.yml
check out my PR repo for Windows 10
Capture

Please provide link of your repo.

https://github.com/justinjohn0306/StyleFlow-Windows-10

On your repo, please expand your instructions:

"conda env create -f env_windows.yml"
What's conda and where do you get it?

"make sure to add Microsoft Visual Studio to windows path"
How? What's the syntax?

"add compiler_bindir_search_path inside custom_ops.py located here ====>> dnnlib\tflib "
Elaborate.

I can figure it out, but it'd be really nice to have GitHub install instructions that actually worked without 5-10 hours of chasing down misc stuff that was left out.

@datduong
Copy link

Can we just use pretrained model without GPU on windows 10?

@leeisack
Copy link

leeisack commented Nov 2, 2021

마지막으로 이 스크립트를 실행합니다. 문제는 1.15가 아닌 tensorflow 1.14를 설치해야 합니다.

이미 env_windows.yml 안에 있습니다.
Windows 10용 내 PR 저장소를 확인하세요.
포착

저장소의 링크를 제공하십시오.

https://github.com/justinjohn0306/StyleFlow-Windows-10

Everything went as you said. But after the ui is turned on, this error occurs ..

Traceback (most recent call last):
File "C:\Users\isack\Documents\StyleFlow\ui\mouse_event.py", line 39, in mousePressEvent
self.showImage(self.point)
File "C:\Users\isack\Documents\StyleFlow\ui\mouse_event.py", line 71, in showImage
self.Form.update_GT_scene_image()
File "main.py", line 158, in update_GT_scene_image
self.fws = self.prior(self.q_array, self.final_array_source, self.zero_padding)
File "C:\Users\isack\Anaconda3\envs\styleflow\lib\site-packages\torch\nn\modules\module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "C:\Users\isack\Documents\StyleFlow\module\cnf.py", line 30, in forward
x, logpx = self.chain[i](x, context, logpx, integration_times, reverse)
File "C:\Users\isack\Anaconda3\envs\styleflow\lib\site-packages\torch\nn\modules\module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "C:\Users\isack\Documents\StyleFlow\module\cnf.py", line 105, in forward
method=self.test_solver,
File "C:\Users\isack\Anaconda3\envs\styleflow\lib\site-packages\torchdiffeq_impl\adjoint.py", line 129, in odeint_adjoint
ys = OdeintAdjointMethod.apply(*y0, func, t, flat_params, rtol, atol, method, options)
File "C:\Users\isack\Anaconda3\envs\styleflow\lib\site-packages\torchdiffeq_impl\adjoint.py", line 18, in forward
ans = odeint(func, y0, t, rtol=rtol, atol=atol, method=method, options=options)
File "C:\Users\isack\Anaconda3\envs\styleflow\lib\site-packages\torchdiffeq_impl\odeint.py", line 76, in odeint
solution = solver.integrate(t)
File "C:\Users\isack\Anaconda3\envs\styleflow\lib\site-packages\torchdiffeq_impl\solvers.py", line 29, in integrate
self.before_integrate(t)
File "C:\Users\isack\Anaconda3\envs\styleflow\lib\site-packages\torchdiffeq_impl\dopri5.py", line 78, in before_integrate
f0 = self.func(t[0].type_as(self.y0[0]), self.y0)
File "C:\Users\isack\Anaconda3\envs\styleflow\lib\site-packages\torch\nn\modules\module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "C:\Users\isack\Documents\StyleFlow\module\odefunc.py", line 133, in forward
dy = self.diffeq(tc, y)
File "C:\Users\isack\Anaconda3\envs\styleflow\lib\site-packages\torch\nn\modules\module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "C:\Users\isack\Documents\StyleFlow\module\odefunc.py", line 97, in forward
dx = layer(context, dx)
File "C:\Users\isack\Anaconda3\envs\styleflow\lib\site-packages\torch\nn\modules\module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "C:\Users\isack\Documents\StyleFlow\module\diffeq_layers.py", line 86, in forward
ret = self._layer(x) * gate + bias
File "C:\Users\isack\Anaconda3\envs\styleflow\lib\site-packages\torch\nn\modules\module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "C:\Users\isack\Anaconda3\envs\styleflow\lib\site-packages\torch\nn\modules\linear.py", line 87, in forward
return F.linear(input, self.weight, self.bias)
File "C:\Users\isack\Anaconda3\envs\styleflow\lib\site-packages\torch\nn\functional.py", line 1371, in linear
output = input.matmul(weight.t())
RuntimeError: CUDA error: CUBLAS_STATUS_EXECUTION_FAILED when calling cublasSgemm( handle, opa, opb, m, n, k, &alpha, a, lda, b, ldb, &beta, c, ldc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants