menyifang / DCT-Net

Official implementation of "DCT-Net: Domain-Calibrated Translation for Portrait Stylization", SIGGRAPH 2022 (TOG); Multi-style cartoonization
Apache License 2.0
786 stars 77 forks source link

The download model name is different from the load name in the source code #34

Closed MolianWH closed 1 year ago

MolianWH commented 1 year ago

run.py only work on anime style, but failed on others. Bellow is my log info.(run2.py is copy from multi-style run.py and renamed)

D:\Documents\Code\Cartoon\DCT-Net-main\run2.py 
2023-03-09 15:20:21.576244: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll
2023-03-09 15:20:23,930 - modelscope - INFO - PyTorch version 1.13.1 Found.
2023-03-09 15:20:23,932 - modelscope - INFO - TensorFlow version 2.1.0 Found.
2023-03-09 15:20:23,932 - modelscope - INFO - Loading ast index from C:\Users\MJJ\.cache\modelscope\ast_indexer
2023-03-09 15:20:23,978 - modelscope - INFO - Loading done! Current index file version is 1.3.2, with md5 fc8b9444f94006776df1e23019c21d88 and a total number of 754 components indexed
2023-03-09 15:20:24.036495: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
2023-03-09 15:20:24.038627: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll
2023-03-09 15:20:24.046150: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1555] Found device 0 with properties: 
pciBusID: 0000:01:00.0 name: NVIDIA GeForce GTX 1070 Ti computeCapability: 6.1
coreClock: 1.683GHz coreCount: 19 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 238.66GiB/s
2023-03-09 15:20:24.046307: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll
2023-03-09 15:20:24.048652: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_10.dll
2023-03-09 15:20:24.051102: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_10.dll
2023-03-09 15:20:24.051798: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library curand64_10.dll
2023-03-09 15:20:24.054790: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusolver64_10.dll
2023-03-09 15:20:24.056258: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusparse64_10.dll
2023-03-09 15:20:24.062435: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll
2023-03-09 15:20:24.062554: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1697] Adding visible gpu devices: 0
2023-03-09 15:20:24.423445: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1096] Device interconnect StreamExecutor with strength 1 edge matrix:
2023-03-09 15:20:24.423538: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102]      0 
2023-03-09 15:20:24.423601: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] 0:   N 
2023-03-09 15:20:24.423795: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1241] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 1638 MB memory) -> physical GPU (device: 0, name: NVIDIA GeForce GTX 1070 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1)
2023-03-09 15:20:25.589881: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1555] Found device 0 with properties: 
pciBusID: 0000:01:00.0 name: NVIDIA GeForce GTX 1070 Ti computeCapability: 6.1
coreClock: 1.683GHz coreCount: 19 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 238.66GiB/s
2023-03-09 15:20:25.590051: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll
2023-03-09 15:20:25.590128: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_10.dll
2023-03-09 15:20:25.590208: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_10.dll
2023-03-09 15:20:25.590289: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library curand64_10.dll
2023-03-09 15:20:25.590364: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusolver64_10.dll
2023-03-09 15:20:25.590440: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusparse64_10.dll
2023-03-09 15:20:25.590516: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll
2023-03-09 15:20:25.590604: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1697] Adding visible gpu devices: 0
2023-03-09 15:20:25.590685: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1096] Device interconnect StreamExecutor with strength 1 edge matrix:
2023-03-09 15:20:25.590762: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102]      0 
2023-03-09 15:20:25.591199: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] 0:   N 
2023-03-09 15:20:25.591295: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1241] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 1638 MB memory) -> physical GPU (device: 0, name: NVIDIA GeForce GTX 1070 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1)
loading model from damo/cv_unet_person-image-cartoon-3d_compound-models\cartoon_anime_h.pb
2023-03-09 15:20:26.638834: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1555] Found device 0 with properties: 
pciBusID: 0000:01:00.0 name: NVIDIA GeForce GTX 1070 Ti computeCapability: 6.1
coreClock: 1.683GHz coreCount: 19 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 238.66GiB/s
2023-03-09 15:20:26.638996: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll
2023-03-09 15:20:26.639072: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_10.dll
2023-03-09 15:20:26.639146: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_10.dll
2023-03-09 15:20:26.639219: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library curand64_10.dll
2023-03-09 15:20:26.639292: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusolver64_10.dll
2023-03-09 15:20:26.639367: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusparse64_10.dll
2023-03-09 15:20:26.639442: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll
2023-03-09 15:20:26.639526: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1697] Adding visible gpu devices: 0
2023-03-09 15:20:26.639607: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1096] Device interconnect StreamExecutor with strength 1 edge matrix:
2023-03-09 15:20:26.639683: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102]      0 
2023-03-09 15:20:26.639731: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] 0:   N 
2023-03-09 15:20:26.639814: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1241] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 1638 MB memory) -> physical GPU (device: 0, name: NVIDIA GeForce GTX 1070 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1)
WARNING:tensorflow:From D:\Documents\Code\Cartoon\DCT-Net-main\source\cartoonize.py:36: FastGFile.__init__ (from tensorflow.python.platform.gfile) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.gfile.GFile.

Process finished with exit code -1073741819 (0xC0000005)
MolianWH commented 1 year ago

It has been solved. It seems failed to load model_bg etc. files. Just modify line 9 - line 21 cartoonize.py in souce directory. delete '_anime' since model file name downloaded without it.

        self.sess_head = self.load_sess(
            os.path.join(dataroot, 'cartoon_h.pb'), 'model_head')
        self.sess_bg = self.load_sess(
            os.path.join(dataroot, 'cartoon_bg.pb'), 'model_bg')