facechain icon indicating copy to clipboard operation
facechain copied to clipboard

Web UI error

Open karimnagdii opened this issue 2 years ago • 4 comments

`** Setting base model to SD1.5 ** --------uuid: qw ----------work_dir: H:\A11111 web ui\stable-diffusion-webui\extensions\facechain\worker_data\qw\ly261666/cv_portrait_model\person1 2023-12-06 02:53:24,678 - modelscope - INFO - Use user-specified model revision: v1.0.0 2023-12-06 02:53:27,177 - modelscope - INFO - Use user-specified model revision: v1.0.0 2023-12-06 02:53:29,287 - modelscope - INFO - Use user-specified model revision: v1.0.0 2023-12-06 02:53:31,293 - modelscope - INFO - Use user-specified model revision: v1.0.0 2023-12-06 02:53:33,279 - modelscope - INFO - Use user-specified model revision: v1.0.0 A matching Triton is not available, some optimizations will not be enabled. Error caught was: No module named 'triton' 2023-12-06 02:53:38,051 - modelscope - INFO - PyTorch version 2.0.1+cu118 Found. 2023-12-06 02:53:38,054 - modelscope - INFO - Loading ast index from C:\Users\user.cache\modelscope\ast_indexer 2023-12-06 02:53:38,141 - modelscope - INFO - Loading done! Current index file version is 1.9.5, with md5 84b56de3260e2ef49d510d523625aa5f and a total number of 945 components indexed 2023-12-06 02:53:40,506 - modelscope - INFO - Use user-specified model revision: v4.0 2023-12-06 02:53:44,495 - modelscope - INFO - Use user-specified model revision: v1.0.1 2023-12-06 02:53:45,075 - modelscope - WARNING - ('PIPELINES', 'skin-retouching-torch', 'skin-retouching-torch') not found in ast index file 2023-12-06 02:53:45,075 - modelscope - INFO - initiate model from C:\Users\user.cache\modelscope\hub\damo\cv_unet_skin_retouching_torch 2023-12-06 02:53:45,075 - modelscope - INFO - initiate model from location C:\Users\user.cache\modelscope\hub\damo\cv_unet_skin_retouching_torch. 2023-12-06 02:53:45,079 - modelscope - WARNING - No preprocessor field found in cfg. 2023-12-06 02:53:45,079 - modelscope - WARNING - No val key and type key found in preprocessor domain of configuration.json file. 2023-12-06 02:53:45,079 - modelscope - WARNING - Cannot find available config to build preprocessor at mode inference, current config: {'model_dir': 'C:\Users\user\.cache\modelscope\hub\damo\cv_unet_skin_retouching_torch'}. trying to build by task and model information. 2023-12-06 02:53:45,079 - modelscope - WARNING - Find task: skin-retouching-torch, model type: None. Insufficient information to build preprocessor, skip building preprocessor 2023-12-06 02:53:48,881 - modelscope - WARNING - Model revision not specified, use revision: v2.0.2 2023-12-06 02:53:51,323 - modelscope - INFO - initiate model from C:\Users\user.cache\modelscope\hub\damo\cv_resnet50_face-detection_retinaface 2023-12-06 02:53:51,323 - modelscope - INFO - initiate model from location C:\Users\user.cache\modelscope\hub\damo\cv_resnet50_face-detection_retinaface. 2023-12-06 02:53:51,327 - modelscope - WARNING - No preprocessor field found in cfg. 2023-12-06 02:53:51,328 - modelscope - WARNING - No val key and type key found in preprocessor domain of configuration.json file. 2023-12-06 02:53:51,328 - modelscope - WARNING - Cannot find available config to build preprocessor at mode inference, current config: {'model_dir': 'C:\Users\user\.cache\modelscope\hub\damo\cv_resnet50_face-detection_retinaface'}. trying to build by task and model information. 2023-12-06 02:53:51,328 - modelscope - WARNING - Find task: face-detection, model type: None. Insufficient information to build preprocessor, skip building preprocessor 2023-12-06 02:53:51,329 - modelscope - INFO - loading model from C:\Users\user.cache\modelscope\hub\damo\cv_resnet50_face-detection_retinaface\pytorch_model.pt 2023-12-06 02:53:51,580 - modelscope - INFO - load model done 2023-12-06 02:53:52.6954159 [W:onnxruntime:, graph.cc:3553 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt__2649'. It is not used by any node and should be removed from the model. 2023-12-06 02:53:52.6978394 [W:onnxruntime:, graph.cc:3553 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt__2644'. It is not used by any node and should be removed from the model. 2023-12-06 02:53:52.7000695 [W:onnxruntime:, graph.cc:3553 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt__2647'. It is not used by any node and should be removed from the model. 2023-12-06 02:53:52.7024952 [W:onnxruntime:, graph.cc:3553 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt__2658'. It is not used by any node and should be removed from the model. 2023-12-06 02:53:52.7047389 [W:onnxruntime:, graph.cc:3553 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt__2648'. It is not used by any node and should be removed from the model. 2023-12-06 02:53:52.7070046 [W:onnxruntime:, graph.cc:3553 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt__2657'. It is not used by any node and should be removed from the model. 2023-12-06 02:53:52.7095192 [W:onnxruntime:, graph.cc:3553 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt__2653'. It is not used by any node and should be removed from the model. 2023-12-06 02:53:52.7124837 [W:onnxruntime:, graph.cc:3553 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt__2652'. It is not used by any node and should be removed from the model. 2023-12-06 02:53:52.7148891 [W:onnxruntime:, graph.cc:3553 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt__2645'. It is not used by any node and should be removed from the model. 2023-12-06 02:53:52.7173563 [W:onnxruntime:, graph.cc:3553 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt__2643'. It is not used by any node and should be removed from the model. 2023-12-06 02:53:52.7196395 [W:onnxruntime:, graph.cc:3553 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt__2641'. It is not used by any node and should be removed from the model. 2023-12-06 02:53:52.7222704 [W:onnxruntime:, graph.cc:3553 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt__2633'. It is not used by any node and should be removed from the model. 2023-12-06 02:53:52.7247169 [W:onnxruntime:, graph.cc:3553 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt__2632'. It is not used by any node and should be removed from the model. 2023-12-06 02:53:52.7275222 [W:onnxruntime:, graph.cc:3553 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt__2624'. It is not used by any node and should be removed from the model. 2023-12-06 02:53:52.7299910 [W:onnxruntime:, graph.cc:3553 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt__2614'. It is not used by any node and should be removed from the model. 2023-12-06 02:53:52.7322451 [W:onnxruntime:, graph.cc:3553 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt__2613'. It is not used by any node and should be removed from the model. 2023-12-06 02:53:52.7343570 [W:onnxruntime:, graph.cc:3553 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt__2606'. It is not used by any node and should be removed from the model. 2023-12-06 02:53:52.7369995 [W:onnxruntime:, graph.cc:3553 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt__2598'. It is not used by any node and should be removed from the model. 2023-12-06 02:53:52.7391435 [W:onnxruntime:, graph.cc:3553 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt__2596'. It is not used by any node and should be removed from the model. 2023-12-06 02:53:52.7412717 [W:onnxruntime:, graph.cc:3553 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer 'const_fold_opt__2594'. It is not used by any node and should be removed from the model. 2023-12-06 02:53:55,668 - modelscope - INFO - Use user-specified model revision: v1.1 2023-12-06 02:53:56,300 - modelscope - INFO - initiate model from C:\Users\user.cache\modelscope\hub\damo\cv_ddsar_face-detection_iclr23-damofd 2023-12-06 02:53:56,300 - modelscope - INFO - initiate model from location C:\Users\user.cache\modelscope\hub\damo\cv_ddsar_face-detection_iclr23-damofd. 2023-12-06 02:53:56,302 - modelscope - INFO - initialize model from C:\Users\user.cache\modelscope\hub\damo\cv_ddsar_face-detection_iclr23-damofd Process Process-1: Traceback (most recent call last): File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\modelscope\utils\registry.py", line 210, in build_from_cfg return obj_cls.instantiate(**args) File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\modelscope\models\base\base_model.py", line 67, in instantiate return cls(**kwargs) File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\modelscope\models\cv\face_detection\scrfd\damofd_detect.py", line 31, in init super().init(model_dir, **kwargs) File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\modelscope\models\cv\face_detection\scrfd\scrfd_detect.py", line 36, in init from mmdet.models import build_detector File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\mmdet\models_init.py", line 2, in from .backbones import * # noqa: F401,F403 File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\mmdet\models\backbones_init.py", line 2, in from .csp_darknet import CSPDarknet File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\mmdet\models\backbones\csp_darknet.py", line 11, in from ..utils import CSPLayer File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\mmdet\models\utils_init_.py", line 13, in from .point_sample import (get_uncertain_point_coords_with_randomness, File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\mmdet\models\utils\point_sample.py", line 3, in from mmcv.ops import point_sample File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\mmcv\ops_init_.py", line 3, in from .active_rotated_filter import active_rotated_filter File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\mmcv\ops\active_rotated_filter.py", line 10, in ext_module = ext_loader.load_ext( File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\mmcv\utils\ext_loader.py", line 13, in load_ext ext = importlib.import_module('mmcv.' + name) File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\importlib_init_.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ModuleNotFoundError: No module named 'mmcv._ext'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\modelscope\utils\registry.py", line 212, in build_from_cfg return obj_cls(**args) File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\modelscope\pipelines\cv\face_detection_pipeline.py", line 36, in init super().init(model=model, **kwargs) File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\modelscope\pipelines\base.py", line 99, in init self.model = self.initiate_single_model(model) File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\modelscope\pipelines\base.py", line 53, in initiate_single_model return Model.from_pretrained( File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\modelscope\models\base\base_model.py", line 183, in from_pretrained model = build_model(model_cfg, task_name=task_name) File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\modelscope\models\builder.py", line 35, in build_model model = build_from_cfg( File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\modelscope\utils\registry.py", line 215, in build_from_cfg raise type(e)(f'{obj_cls.name}: {e}') ModuleNotFoundError: DamoFdDetect: No module named 'mmcv._ext'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\multiprocessing\process.py", line 314, in _bootstrap self.run() File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\multiprocessing\process.py", line 108, in run self._target(*self._args, **self._kwargs) File "H:\A11111 web ui\stable-diffusion-webui\extensions\facechain\facechain\inference.py", line 25, in _data_process_fn_process Blipv2()(input_img_dir) File "H:\A11111 web ui\stable-diffusion-webui\extensions\facechain\facechain\data_process\preprocessing.py", line 207, in init self.face_detection = pipeline(task=Tasks.face_detection, model='damo/cv_ddsar_face-detection_iclr23-damofd', model_revision='v1.1') File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\modelscope\pipelines\builder.py", line 162, in pipeline return build_pipeline(cfg, task_name=task) File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\modelscope\pipelines\builder.py", line 65, in build_pipeline return build_from_cfg( File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\modelscope\utils\registry.py", line 215, in build_from_cfg raise type(e)(f'{obj_cls.name}: {e}') ModuleNotFoundError: FaceDetectionPipeline: DamoFdDetect: No module named 'mmcv._ext' instance_data_dir H:\A11111 web ui\stable-diffusion-webui\extensions\facechain\worker_data\qw\training_data\ly261666/cv_portrait_model\person1 Traceback (most recent call last): File "H:\A11111 web ui\stable-diffusion-webui\extensions\facechain\facechain\train_text_to_image_lora.py", line 31, in import datasets ModuleNotFoundError: No module named 'datasets' Error executing the command: Command '['python', 'H:\A11111 web ui\stable-diffusion-webui\extensions\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=H:\A11111 web ui\stable-diffusion-webui\extensions\facechain\worker_data\qw\training_data\ly261666/cv_portrait_model\person1', '--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=H:\A11111 web ui\stable-diffusion-webui\extensions\facechain\worker_data\qw\ly261666/cv_portrait_model\person1', '--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 "H:\A11111 web ui\stable-diffusion-webui\extensions\facechain\app.py", line 147, in train_lora_fn subprocess.run(command, check=True) File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 526, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['python', 'H:\A11111 web ui\stable-diffusion-webui\extensions\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=H:\A11111 web ui\stable-diffusion-webui\extensions\facechain\worker_data\qw\training_data\ly261666/cv_portrait_model\person1', '--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=H:\A11111 web ui\stable-diffusion-webui\extensions\facechain\worker_data\qw\ly261666/cv_portrait_model\person1', '--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 "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict output = await app.get_blocks().process_api( File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1431, in process_api result = await self.call_function( File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1103, in call_function prediction = await anyio.to_thread.run_sync( File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "H:\A11111 web ui\stable-diffusion-webui\venv\lib\site-packages\gradio\utils.py", line 707, in wrapper response = f(*args, **kwargs) File "H:\A11111 web ui\stable-diffusion-webui\extensions\facechain\app.py", line 801, in run train_lora_fn(base_model_path=base_model_path, File "H:\A11111 web ui\stable-diffusion-webui\extensions\facechain\app.py", line 150, in train_lora_fn raise gr.Error("训练失败 (Training failed)") gradio.exceptions.Error: '训练失败 (Training failed)'`

karimnagdii avatar Dec 06 '23 00:12 karimnagdii

same error

thundax-lyp avatar Dec 06 '23 05:12 thundax-lyp

it's such a hot mess. i resolved a lot of the errors shown here but they just cascade into others and even chatgpt is at a loss as to what to do anymore.

x-ili-x avatar Dec 12 '23 14:12 x-ili-x

Please install mmcv with:
min install mmcv-full==1.7.2 ref: https://mmcv.readthedocs.io/en/latest/get_started/installation.html

liuyhwangyh avatar Dec 30 '23 02:12 liuyhwangyh

Please install mmcv with: min install mmcv-full==1.7.2 ref: https://mmcv.readthedocs.io/en/latest/get_started/installation.html

already tried that did not work

karimnagdii avatar Jan 03 '24 23:01 karimnagdii

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

sunbaigui avatar Jun 04 '24 09:06 sunbaigui