modelscope / facechain

FaceChain is a deep-learning toolchain for generating your Digital-Twin.
Apache License 2.0
8.91k stars 839 forks source link

Error in conda env installation #460

Closed nghiap closed 3 months ago

nghiap commented 9 months ago

Hi everyone,

I have followed the step to install with conda option and everything went well.
However, after running >python app.py and open up the webpage, upload 1 image to start training I got this error. Please help me get through this.

(facechain) D:\facechain>python app.py 2023-12-06 13:17:17,119 - modelscope - INFO - PyTorch version 2.1.1+cu118 Found. 2023-12-06 13:17:17,126 - modelscope - INFO - TensorFlow version 2.8.0 Found. 2023-12-06 13:17:17,127 - modelscope - INFO - Loading ast index from C:\Users\nghia.cache\modelscope\ast_indexer 2023-12-06 13:17:17,242 - modelscope - INFO - Loading done! Current index file version is 1.9.5, with md5 27fe9f76bf9ba914bd14048d7fb5de02 and a total number of 945 components indexed app.py:993: GradioDeprecationWarning: The style method is deprecated. Please set these arguments in the constructor instead. image = gr.Image(source='webcam',type="filepath",visible=False).style(height=500,width=500) app.py:1134: GradioDeprecationWarning: The style method is deprecated. Please set these arguments in the constructor instead. output_images = gr.Gallery(label='Output', show_label=False).style(columns=3, rows=2, height=600, [['D:\facechain/resources/inpaint_template\1.jpg'], ['D:\facechain/resources/inpaint_template\2.jpg'], ['D:\facechain/resources/inpaint_template\3.jpg'], ['D:\facechain/resources/inpaint_template\4.jpg'], ['D:\facechain/resources/inpaint_template\5.jpg']] app.py:1236: GradioDeprecationWarning: The style method is deprecated. Please set these arguments in the constructor instead. output_images = gr.Gallery( [['resources/tryon_garment\garment1.png'], ['resources/tryon_garment\garment2.png'], ['resources/tryon_garment\garment3.png'], ['resources/tryon_garment\garment4.png']] app.py:1376: GradioDeprecationWarning: The style method is deprecated. Please set these arguments in the constructor instead. output_images = gr.Gallery( Running on local URL: http://127.0.0.1:7860 Running on public URL: https://a08efcdd2df430fcc2.gradio.live

This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run gradio deploy from Terminal to deploy to Spaces (https://huggingface.co/spaces) ???? --------uuid: qw ----------work_dir: D:\facechain\worker_data\qw\ly261666/cv_portrait_model\nhu3 2023-12-06 13:18:25,989 - modelscope - INFO - Use user-specified model revision: v1.0.0 C:\ProgramData\anaconda3\envs\facechain\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py:65: UserWarning: Specified provider 'CUDAExecutionProvider' is not in available provider names.Available providers: 'CPUExecutionProvider' warnings.warn( 2023-12-06 13:18:33,626 - modelscope - INFO - PyTorch version 2.1.1+cu118 Found. 2023-12-06 13:18:33,632 - modelscope - INFO - TensorFlow version 2.8.0 Found. 2023-12-06 13:18:33,632 - modelscope - INFO - Loading ast index from C:\Users\nghia.cache\modelscope\ast_indexer 2023-12-06 13:18:33,756 - modelscope - INFO - Loading done! Current index file version is 1.9.5, with md5 27fe9f76bf9ba914bd14048d7fb5de02 and a total number of 945 components indexed D:\facechain\app.py:993: GradioDeprecationWarning: The style method is deprecated. Please set these arguments in the constructor instead. image = gr.Image(source='webcam',type="filepath",visible=False).style(height=500,width=500) D:\facechain\app.py:1134: GradioDeprecationWarning: The style method is deprecated. Please set these arguments in the constructor instead. output_images = gr.Gallery(label='Output', show_label=False).style(columns=3, rows=2, height=600, [['D:\facechain/resources/inpaint_template\1.jpg'], ['D:\facechain/resources/inpaint_template\2.jpg'], ['D:\facechain/resources/inpaint_template\3.jpg'], ['D:\facechain/resources/inpaint_template\4.jpg'], ['D:\facechain/resources/inpaint_template\5.jpg']] D:\facechain\app.py:1236: GradioDeprecationWarning: The style method is deprecated. Please set these arguments in the constructor instead. output_images = gr.Gallery( [['resources/tryon_garment\garment1.png'], ['resources/tryon_garment\garment2.png'], ['resources/tryon_garment\garment3.png'], ['resources/tryon_garment\garment4.png']] D:\facechain\app.py:1376: GradioDeprecationWarning: The style method is deprecated. Please set these arguments in the constructor instead. output_images = gr.Gallery( 2023-12-06 13:18:45,556 - modelscope - INFO - Use user-specified model revision: v4.0 2023-12-06 13:18:50,412 - modelscope - INFO - Use user-specified model revision: v1.0.1 2023-12-06 13:18:51,139 - modelscope - WARNING - ('PIPELINES', 'skin-retouching-torch', 'skin-retouching-torch') not found in ast index file 2023-12-06 13:18:51,139 - modelscope - INFO - initiate model from C:\Users\nghia.cache\modelscope\hub\damo\cv_unet_skin_retouching_torch 2023-12-06 13:18:51,141 - modelscope - INFO - initiate model from location C:\Users\nghia.cache\modelscope\hub\damo\cv_unet_skin_retouching_torch. 2023-12-06 13:18:51,154 - modelscope - WARNING - No preprocessor field found in cfg. 2023-12-06 13:18:51,154 - modelscope - WARNING - No val key and type key found in preprocessor domain of configuration.json file. 2023-12-06 13:18:51,155 - modelscope - WARNING - Cannot find available config to build preprocessor at mode inference, current config: {'model_dir': 'C:\Users\nghia\.cache\modelscope\hub\damo\cv_unet_skin_retouching_torch'}. trying to build by task and model information. 2023-12-06 13:18:51,156 - modelscope - WARNING - Find task: skin-retouching-torch, model type: None. Insufficient information to build preprocessor, skip building preprocessor 2023-12-06 13:18:55,555 - modelscope - WARNING - Model revision not specified, use revision: v2.0.2 2023-12-06 13:18:57,779 - modelscope - INFO - initiate model from C:\Users\nghia.cache\modelscope\hub\damo\cv_resnet50_face-detection_retinaface 2023-12-06 13:18:57,781 - modelscope - INFO - initiate model from location C:\Users\nghia.cache\modelscope\hub\damo\cv_resnet50_face-detection_retinaface. 2023-12-06 13:18:57,810 - modelscope - WARNING - No preprocessor field found in cfg. 2023-12-06 13:18:57,811 - modelscope - WARNING - No val key and type key found in preprocessor domain of configuration.json file. 2023-12-06 13:18:57,814 - modelscope - WARNING - Cannot find available config to build preprocessor at mode inference, current config: {'model_dir': 'C:\Users\nghia\.cache\modelscope\hub\damo\cv_resnet50_face-detection_retinaface'}. trying to build by task and model information. 2023-12-06 13:18:57,815 - modelscope - WARNING - Find task: face-detection, model type: None. Insufficient information to build preprocessor, skip building preprocessor 2023-12-06 13:18:57,821 - modelscope - INFO - loading model from C:\Users\nghia.cache\modelscope\hub\damo\cv_resnet50_face-detection_retinaface\pytorch_model.pt 2023-12-06 13:18:58,437 - modelscope - INFO - load model done 2023-12-06 13:19:00.7095781 [W:onnxruntime:, graph.cc:3543 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt2649'. It is not used by any node and should be removed from the model. 2023-12-06 13:19:00.7178372 [W:onnxruntime:, graph.cc:3543 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt2644'. It is not used by any node and should be removed from the model. 2023-12-06 13:19:00.7244735 [W:onnxruntime:, graph.cc:3543 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt2647'. It is not used by any node and should be removed from the model. 2023-12-06 13:19:00.7335546 [W:onnxruntime:, graph.cc:3543 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt2658'. It is not used by any node and should be removed from the model. 2023-12-06 13:19:00.7403016 [W:onnxruntime:, graph.cc:3543 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt2648'. It is not used by any node and should be removed from the model. 2023-12-06 13:19:00.7494520 [W:onnxruntime:, graph.cc:3543 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt2657'. It is not used by any node and should be removed from the model. 2023-12-06 13:19:00.7562766 [W:onnxruntime:, graph.cc:3543 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt2653'. It is not used by any node and should be removed from the model. 2023-12-06 13:19:00.7694205 [W:onnxruntime:, graph.cc:3543 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt2652'. It is not used by any node and should be removed from the model. 2023-12-06 13:19:00.7796389 [W:onnxruntime:, graph.cc:3543 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt2645'. It is not used by any node and should be removed from the model. 2023-12-06 13:19:00.7910183 [W:onnxruntime:, graph.cc:3543 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt2643'. It is not used by any node and should be removed from the model. 2023-12-06 13:19:00.8021282 [W:onnxruntime:, graph.cc:3543 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt2641'. It is not used by any node and should be removed from the model. 2023-12-06 13:19:00.8080067 [W:onnxruntime:, graph.cc:3543 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt2633'. It is not used by any node and should be removed from the model. 2023-12-06 13:19:00.8185759 [W:onnxruntime:, graph.cc:3543 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt2632'. It is not used by any node and should be removed from the model. 2023-12-06 13:19:00.8250611 [W:onnxruntime:, graph.cc:3543 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt2624'. It is not used by any node and should be removed from the model. 2023-12-06 13:19:00.8364886 [W:onnxruntime:, graph.cc:3543 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt2614'. It is not used by any node and should be removed from the model. 2023-12-06 13:19:00.8504935 [W:onnxruntime:, graph.cc:3543 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt2613'. It is not used by any node and should be removed from the model. 2023-12-06 13:19:00.8580738 [W:onnxruntime:, graph.cc:3543 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt2606'. It is not used by any node and should be removed from the model. 2023-12-06 13:19:00.8712898 [W:onnxruntime:, graph.cc:3543 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt2598'. It is not used by any node and should be removed from the model. 2023-12-06 13:19:00.8846963 [W:onnxruntime:, graph.cc:3543 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt2596'. It is not used by any node and should be removed from the model. 2023-12-06 13:19:00.8906833 [W:onnxruntime:, graph.cc:3543 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt2594'. It is not used by any node and should be removed from the model. 2023-12-06 13:19:04,333 - modelscope - INFO - Use user-specified model revision: v1.1 2023-12-06 13:19:04,846 - modelscope - INFO - initiate model from C:\Users\nghia.cache\modelscope\hub\damo\cv_ddsar_face-detection_iclr23-damofd 2023-12-06 13:19:04,847 - modelscope - INFO - initiate model from location C:\Users\nghia.cache\modelscope\hub\damo\cv_ddsar_face-detection_iclr23-damofd. 2023-12-06 13:19:04,861 - modelscope - INFO - initialize model from C:\Users\nghia.cache\modelscope\hub\damo\cv_ddsar_face-detection_iclr23-damofd 2023-12-06 13:19:07,729 - mmcv - INFO - initialize PAFPN with init_cfg {'type': 'Xavier', 'layer': 'Conv2d', 'distribution': 'uniform'} 2023-12-06 13:19:07,734 - mmcv - INFO - lateral_convs.0.conv.weight - torch.Size([16, 64, 1, 1]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:07,734 - mmcv - INFO - lateral_convs.0.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:07,735 - mmcv - INFO - lateral_convs.1.conv.weight - torch.Size([16, 120, 1, 1]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:07,735 - mmcv - INFO - lateral_convs.1.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:07,736 - mmcv - INFO - lateral_convs.2.conv.weight - torch.Size([16, 160, 1, 1]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:07,737 - mmcv - INFO - lateral_convs.2.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:07,737 - mmcv - INFO - fpn_convs.0.conv.weight - torch.Size([16, 16, 3, 3]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:07,738 - mmcv - INFO - fpn_convs.0.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:07,739 - mmcv - INFO - fpn_convs.1.conv.weight - torch.Size([16, 16, 3, 3]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:07,739 - mmcv - INFO - fpn_convs.1.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:07,740 - mmcv - INFO - fpn_convs.2.conv.weight - torch.Size([16, 16, 3, 3]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:07,740 - mmcv - INFO - fpn_convs.2.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:07,740 - mmcv - INFO - downsample_convs.0.conv.weight - torch.Size([16, 16, 3, 3]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:07,741 - mmcv - INFO - downsample_convs.0.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:07,742 - mmcv - INFO - downsample_convs.1.conv.weight - torch.Size([16, 16, 3, 3]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:07,743 - mmcv - INFO - downsample_convs.1.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:07,745 - mmcv - INFO - pafpn_convs.0.conv.weight - torch.Size([16, 16, 3, 3]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:07,746 - mmcv - INFO - pafpn_convs.0.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:07,747 - mmcv - INFO - pafpn_convs.1.conv.weight - torch.Size([16, 16, 3, 3]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:07,748 - mmcv - INFO - pafpn_convs.1.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:07,749 - modelscope - INFO - loading model from C:\Users\nghia.cache\modelscope\hub\damo\cv_ddsar_face-detection_iclr23-damofd\pytorch_model.pt load checkpoint from local path: C:\Users\nghia.cache\modelscope\hub\damo\cv_ddsar_face-detection_iclr23-damofd\pytorch_model.pt 2023-12-06 13:19:07,822 - modelscope - INFO - load model done 2023-12-06 13:19:10,642 - modelscope - INFO - Use user-specified model revision: v1.0.1 2023-12-06 13:19:11,194 - modelscope - INFO - initiate model from C:\Users\nghia.cache\modelscope\hub\damo\cv_resnet101_image-multiple-human-parsing 2023-12-06 13:19:11,195 - modelscope - INFO - initiate model from location C:\Users\nghia.cache\modelscope\hub\damo\cv_resnet101_image-multiple-human-parsing. 2023-12-06 13:19:11,201 - modelscope - INFO - initialize model from C:\Users\nghia.cache\modelscope\hub\damo\cv_resnet101_image-multiple-human-parsing 2023-12-06 13:19:11,853 - modelscope - INFO - loading model from C:\Users\nghia.cache\modelscope\hub\damo\cv_resnet101_image-multiple-human-parsing\pytorch_model.pt 2023-12-06 13:19:12,581 - modelscope - INFO - criterion.empty_weight doesn't exist in current model, skip loading. 2023-12-06 13:19:12,672 - modelscope - INFO - load model done 2023-12-06 13:19:12,683 - modelscope - WARNING - No preprocessor field found in cfg. 2023-12-06 13:19:12,683 - modelscope - WARNING - No val key and type key found in preprocessor domain of configuration.json file. 2023-12-06 13:19:12,683 - modelscope - WARNING - Cannot find available config to build preprocessor at mode inference, current config: {'model_dir': 'C:\Users\nghia\.cache\modelscope\hub\damo\cv_resnet101_image-multiple-human-parsing'}. trying to build by task and model information. 2023-12-06 13:19:12,684 - modelscope - WARNING - No preprocessor key ('m2fp', 'image-segmentation') found in PREPROCESSOR_MAP, skip building preprocessor. 2023-12-06 13:19:15,702 - modelscope - INFO - Use user-specified model revision: v2.0.2 2023-12-06 13:19:17,578 - modelscope - INFO - initiate model from C:\Users\nghia.cache\modelscope\hub\damo\cv_resnet34_face-attribute-recognition_fairface 2023-12-06 13:19:17,580 - modelscope - INFO - initiate model from location C:\Users\nghia.cache\modelscope\hub\damo\cv_resnet34_face-attribute-recognition_fairface. 2023-12-06 13:19:17,599 - modelscope - WARNING - No preprocessor field found in cfg. 2023-12-06 13:19:17,599 - modelscope - WARNING - No val key and type key found in preprocessor domain of configuration.json file. 2023-12-06 13:19:17,600 - modelscope - WARNING - Cannot find available config to build preprocessor at mode inference, current config: {'model_dir': 'C:\Users\nghia\.cache\modelscope\hub\damo\cv_resnet34_face-attribute-recognition_fairface'}. trying to build by task and model information. 2023-12-06 13:19:17,602 - modelscope - WARNING - Find task: face-attribute-recognition, model type: None. Insufficient information to build preprocessor, skip building preprocessor 2023-12-06 13:19:21,256 - modelscope - WARNING - Model revision not specified, use revision: v1.1 2023-12-06 13:19:21,775 - modelscope - INFO - initiate model from C:\Users\nghia.cache\modelscope\hub\damo\cv_ddsar_face-detection_iclr23-damofd 2023-12-06 13:19:21,777 - modelscope - INFO - initiate model from location C:\Users\nghia.cache\modelscope\hub\damo\cv_ddsar_face-detection_iclr23-damofd. 2023-12-06 13:19:21,794 - modelscope - INFO - initialize model from C:\Users\nghia.cache\modelscope\hub\damo\cv_ddsar_face-detection_iclr23-damofd 2023-12-06 13:19:21,927 - mmcv - INFO - initialize PAFPN with init_cfg {'type': 'Xavier', 'layer': 'Conv2d', 'distribution': 'uniform'} 2023-12-06 13:19:21,929 - mmcv - INFO - lateral_convs.0.conv.weight - torch.Size([16, 64, 1, 1]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:21,930 - mmcv - INFO - lateral_convs.0.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:21,931 - mmcv - INFO - lateral_convs.1.conv.weight - torch.Size([16, 120, 1, 1]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:21,932 - mmcv - INFO - lateral_convs.1.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:21,932 - mmcv - INFO - lateral_convs.2.conv.weight - torch.Size([16, 160, 1, 1]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:21,933 - mmcv - INFO - lateral_convs.2.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:21,934 - mmcv - INFO - fpn_convs.0.conv.weight - torch.Size([16, 16, 3, 3]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:21,934 - mmcv - INFO - fpn_convs.0.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:21,935 - mmcv - INFO - fpn_convs.1.conv.weight - torch.Size([16, 16, 3, 3]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:21,935 - mmcv - INFO - fpn_convs.1.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:21,936 - mmcv - INFO - fpn_convs.2.conv.weight - torch.Size([16, 16, 3, 3]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:21,936 - mmcv - INFO - fpn_convs.2.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:21,937 - mmcv - INFO - downsample_convs.0.conv.weight - torch.Size([16, 16, 3, 3]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:21,937 - mmcv - INFO - downsample_convs.0.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:21,938 - mmcv - INFO - downsample_convs.1.conv.weight - torch.Size([16, 16, 3, 3]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:21,938 - mmcv - INFO - downsample_convs.1.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:21,938 - mmcv - INFO - pafpn_convs.0.conv.weight - torch.Size([16, 16, 3, 3]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:21,939 - mmcv - INFO - pafpn_convs.0.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:21,939 - mmcv - INFO - pafpn_convs.1.conv.weight - torch.Size([16, 16, 3, 3]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:21,939 - mmcv - INFO - pafpn_convs.1.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:21,940 - modelscope - INFO - loading model from C:\Users\nghia.cache\modelscope\hub\damo\cv_ddsar_face-detection_iclr23-damofd\pytorch_model.pt load checkpoint from local path: C:\Users\nghia.cache\modelscope\hub\damo\cv_ddsar_face-detection_iclr23-damofd\pytorch_model.pt 2023-12-06 13:19:22,455 - modelscope - INFO - load model done 2023-12-06 13:19:22,472 - modelscope - INFO - loading model from C:\Users\nghia.cache\modelscope\hub\damo\cv_resnet34_face-attribute-recognition_fairface\pytorch_model.pt 2023-12-06 13:19:22,943 - modelscope - INFO - load model done 2023-12-06 13:19:25,956 - modelscope - INFO - Use user-specified model revision: v2.5 2023-12-06 13:19:26,539 - modelscope - INFO - initiate model from C:\Users\nghia.cache\modelscope\hub\damo\cv_manual_facial-landmark-confidence_flcm 2023-12-06 13:19:26,540 - modelscope - INFO - initiate model from location C:\Users\nghia.cache\modelscope\hub\damo\cv_manual_facial-landmark-confidence_flcm. 2023-12-06 13:19:26,575 - modelscope - WARNING - No preprocessor field found in cfg. 2023-12-06 13:19:26,576 - modelscope - WARNING - No val key and type key found in preprocessor domain of configuration.json file. 2023-12-06 13:19:26,579 - modelscope - WARNING - Cannot find available config to build preprocessor at mode inference, current config: {'model_dir': 'C:\Users\nghia\.cache\modelscope\hub\damo\cv_manual_facial-landmark-confidence_flcm'}. trying to build by task and model information. 2023-12-06 13:19:26,581 - modelscope - WARNING - Find task: face-2d-keypoints, model type: None. Insufficient information to build preprocessor, skip building preprocessor 2023-12-06 13:19:30,086 - modelscope - WARNING - Model revision not specified, use revision: v1.1 2023-12-06 13:19:30,686 - modelscope - INFO - initiate model from C:\Users\nghia.cache\modelscope\hub\damo\cv_ddsar_face-detection_iclr23-damofd 2023-12-06 13:19:30,687 - modelscope - INFO - initiate model from location C:\Users\nghia.cache\modelscope\hub\damo\cv_ddsar_face-detection_iclr23-damofd. 2023-12-06 13:19:30,700 - modelscope - INFO - initialize model from C:\Users\nghia.cache\modelscope\hub\damo\cv_ddsar_face-detection_iclr23-damofd 2023-12-06 13:19:30,785 - mmcv - INFO - initialize PAFPN with init_cfg {'type': 'Xavier', 'layer': 'Conv2d', 'distribution': 'uniform'} 2023-12-06 13:19:30,787 - mmcv - INFO - lateral_convs.0.conv.weight - torch.Size([16, 64, 1, 1]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:30,788 - mmcv - INFO - lateral_convs.0.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:30,789 - mmcv - INFO - lateral_convs.1.conv.weight - torch.Size([16, 120, 1, 1]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:30,790 - mmcv - INFO - lateral_convs.1.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:30,791 - mmcv - INFO - lateral_convs.2.conv.weight - torch.Size([16, 160, 1, 1]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:30,791 - mmcv - INFO - lateral_convs.2.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:30,792 - mmcv - INFO - fpn_convs.0.conv.weight - torch.Size([16, 16, 3, 3]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:30,794 - mmcv - INFO - fpn_convs.0.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:30,795 - mmcv - INFO - fpn_convs.1.conv.weight - torch.Size([16, 16, 3, 3]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:30,796 - mmcv - INFO - fpn_convs.1.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:30,798 - mmcv - INFO - fpn_convs.2.conv.weight - torch.Size([16, 16, 3, 3]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:30,798 - mmcv - INFO - fpn_convs.2.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:30,799 - mmcv - INFO - downsample_convs.0.conv.weight - torch.Size([16, 16, 3, 3]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:30,802 - mmcv - INFO - downsample_convs.0.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:30,803 - mmcv - INFO - downsample_convs.1.conv.weight - torch.Size([16, 16, 3, 3]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:30,804 - mmcv - INFO - downsample_convs.1.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:30,805 - mmcv - INFO - pafpn_convs.0.conv.weight - torch.Size([16, 16, 3, 3]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:30,805 - mmcv - INFO - pafpn_convs.0.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:30,806 - mmcv - INFO - pafpn_convs.1.conv.weight - torch.Size([16, 16, 3, 3]): XavierInit: gain=1, distribution=uniform, bias=0

2023-12-06 13:19:30,806 - mmcv - INFO - pafpn_convs.1.conv.bias - torch.Size([16]): The value is the same before and after calling init_weights of PAFPN

2023-12-06 13:19:30,807 - modelscope - INFO - loading model from C:\Users\nghia.cache\modelscope\hub\damo\cv_ddsar_face-detection_iclr23-damofd\pytorch_model.pt load checkpoint from local path: C:\Users\nghia.cache\modelscope\hub\damo\cv_ddsar_face-detection_iclr23-damofd\pytorch_model.pt 2023-12-06 13:19:30,889 - modelscope - INFO - load model done 2023-12-06 13:19:30,909 - modelscope - INFO - loading model from C:\Users\nghia.cache\modelscope\hub\damo\cv_manual_facial-landmark-confidence_flcm\pytorch_model.pt 2023-12-06 13:19:30,948 - modelscope - INFO - load model done cathed for image process of 000.jpg Error: nms_impl: implementation for device cuda:0 not found.

[] Error: result is empty. None instance_data_dir D:\facechain\worker_data\qw\training_data\ly261666/cv_portrait_model\nhu3 2023-12-06 13:19:43,284 - modelscope - INFO - PyTorch version 2.1.1+cu118 Found. 2023-12-06 13:19:43,289 - modelscope - INFO - TensorFlow version 2.8.0 Found. 2023-12-06 13:19:43,289 - modelscope - INFO - Loading ast index from C:\Users\nghia.cache\modelscope\ast_indexer 2023-12-06 13:19:43,430 - modelscope - INFO - Loading done! Current index file version is 1.9.5, with md5 27fe9f76bf9ba914bd14048d7fb5de02 and a total number of 945 components indexed 12/06/2023 13:19:46 - INFO - main - Distributed environment: NO Num processes: 1 Process index: 0 Local process index: 0 Device: cuda

Mixed precision type: no

2023-12-06 13:19:47,718 - modelscope - INFO - Use user-specified model revision: v2.0 {'clip_sample_range', 'dynamic_thresholding_ratio', 'sample_max_value', 'variance_type', 'thresholding'} was not found in config. Values will be initialized to default values. {'force_upcast'} was not found in config. Values will be initialized to default values. {'attention_type', 'dropout', 'reverse_transformer_layers_per_block'} was not found in config. Values will be initialized to default values. Traceback (most recent call last): File "D:\facechain/facechain/train_text_to_image_lora.py", line 1220, in main() File "D:\facechain/facechain/train_text_to_image_lora.py", line 791, in main dataset = load_dataset( File "C:\ProgramData\anaconda3\envs\facechain\lib\site-packages\datasets\load.py", line 1773, in load_dataset builder_instance = load_dataset_builder( File "C:\ProgramData\anaconda3\envs\facechain\lib\site-packages\datasets\load.py", line 1502, in load_dataset_builder dataset_module = dataset_module_factory( File "C:\ProgramData\anaconda3\envs\facechain\lib\site-packages\datasets\load.py", line 1151, in dataset_module_factory return LocalDatasetModuleFactoryWithoutScript( File "C:\ProgramData\anaconda3\envs\facechain\lib\site-packages\datasets\load.py", line 630, in get_module sanitize_patterns(self.data_files) if self.data_files is not None else get_data_patterns_locally(base_path) File "C:\ProgramData\anaconda3\envs\facechain\lib\site-packages\datasets\data_files.py", line 444, in get_data_patterns_locally return _get_data_files_patterns(resolver) File "C:\ProgramData\anaconda3\envs\facechain\lib\site-packages\datasets\data_files.py", line 223, in _get_data_files_patterns data_files = pattern_resolver(pattern) File "C:\ProgramData\anaconda3\envs\facechain\lib\site-packages\datasets\data_files.py", line 264, in _resolve_single_pattern_locally glob_iter = [PurePath(filepath) for filepath in fs.glob(pattern) if fs.isfile(filepath)] File "C:\ProgramData\anaconda3\envs\facechain\lib\site-packages\fsspec\spec.py", line 606, in glob pattern = glob_translate(path + ("/" if ends_with_sep else "")) File "C:\ProgramData\anaconda3\envs\facechain\lib\site-packages\fsspec\utils.py", line 734, in glob_translate raise ValueError( ValueError: Invalid pattern: '**' can only be an entire path component Error executing the command: Command '['python', 'D:\facechain/facechain/train_text_to_image_lora.py', '--pretrained_model_name_or_path=ly261666/cv_portrait_model', '--revision=v2.0', '--sub_path=film/film', '--output_dataset_name=D:\facechain\worker_data\qw\training_data\ly261666/cv_portrait_model\nhu3', '--caption_column=text', '--resolution=512', '--random_flip', '--train_batch_size=1', '--num_train_epochs=200', '--checkpointing_steps=5000', '--learning_rate=1.5e-04', '--lr_scheduler=cosine', '--lr_warmup_steps=0', '--seed=42', '--output_dir=D:\facechain\worker_data\qw\ly261666/cv_portrait_model\nhu3', '--lora_r=4', '--lora_alpha=32', '--lora_text_encoder_r=32', '--lora_text_encoder_alpha=32', '--resume_from_checkpoint=fromfacecommon']' returned non-zero exit status 1. Traceback (most recent call last): File "app.py", line 112, in train_lora_fn subprocess.run(command, check=True) File "C:\ProgramData\anaconda3\envs\facechain\lib\subprocess.py", line 516, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['python', 'D:\facechain/facechain/train_text_to_image_lora.py', '--pretrained_model_name_or_path=ly261666/cv_portrait_model', '--revision=v2.0', '--sub_path=film/film', '--output_dataset_name=D:\facechain\worker_data\qw\training_data\ly261666/cv_portrait_model\nhu3', '--caption_column=text', '--resolution=512', '--random_flip', '--train_batch_size=1', '--num_train_epochs=200', '--checkpointing_steps=5000', '--learning_rate=1.5e-04', '--lr_scheduler=cosine', '--lr_warmup_steps=0', '--seed=42', '--output_dir=D:\facechain\worker_data\qw\ly261666/cv_portrait_model\nhu3', '--lora_r=4', '--lora_alpha=32', '--lora_text_encoder_r=32', '--lora_text_encoder_alpha=32', '--resume_from_checkpoint=fromfacecommon']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\ProgramData\anaconda3\envs\facechain\lib\site-packages\gradio\queueing.py", line 407, in call_prediction output = await route_utils.call_process_api( File "C:\ProgramData\anaconda3\envs\facechain\lib\site-packages\gradio\route_utils.py", line 226, in call_process_api output = await app.get_blocks().process_api( File "C:\ProgramData\anaconda3\envs\facechain\lib\site-packages\gradio\blocks.py", line 1550, in process_api result = await self.call_function( File "C:\ProgramData\anaconda3\envs\facechain\lib\site-packages\gradio\blocks.py", line 1185, in call_function prediction = await anyio.to_thread.run_sync( File "C:\ProgramData\anaconda3\envs\facechain\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\ProgramData\anaconda3\envs\facechain\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "C:\ProgramData\anaconda3\envs\facechain\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, args) File "C:\ProgramData\anaconda3\envs\facechain\lib\site-packages\gradio\utils.py", line 661, in wrapper response = f(args, **kwargs) File "app.py", line 690, in run train_lora_fn(base_model_path=base_model_path, File "app.py", line 115, in train_lora_fn raise gr.Error("???? (Training failed)")

thundax-lyp commented 9 months ago

same error in sdui

yaozhanwei commented 9 months ago

You can try it like this pip uninstall fsspec pip install fsspec==2023.9.2

thundax-lyp commented 9 months ago

You can try it like this pip uninstall fsspec pip install fsspec==2023.9.2

it works, thanks

sunbaigui commented 3 months ago

please try out the newest train-free, 10s inference version facechain-fact.