Skip to content

python调用 训练脚本,报错:认证token 失败 #184

@hccywq

Description

@hccywq

2023-09-06 23:01:32,605 - modelscope - ERROR - Authentication token does not exist, failed to access model "ly261666/cv_portrait_model" which may not exist or may be private. Please login first.
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/site-packages/modelscope/hub/errors.py", line 81, in handle_http_response
response.raise_for_status()
File "/opt/conda/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://www.modelscope.cn/api/v1/models/%22ly261666/cv_portrait_model%22/revisions?EndTime=1694012492

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "facechain/train_text_to_image_lora.py", line 1469, in
main()
File "facechain/train_text_to_image_lora.py", line 816, in main
model_dir = snapshot_download(args.pretrained_model_name_or_path,
File "/opt/conda/lib/python3.8/site-packages/modelscope/hub/snapshot_download.py", line 96, in snapshot_download
revision = _api.get_valid_revision(
File "/opt/conda/lib/python3.8/site-packages/modelscope/hub/api.py", line 479, in get_valid_revision
revisions = self.list_model_revisions(
File "/opt/conda/lib/python3.8/site-packages/modelscope/hub/api.py", line 433, in list_model_revisions
handle_http_response(r, logger, cookies, model_id)
File "/opt/conda/lib/python3.8/site-packages/modelscope/hub/errors.py", line 88, in handle_http_response
raise HTTPError('Response details: %s' % message) from error
requests.exceptions.HTTPError: Response details: {'Code': 10010205001, 'Message': '获取模型版本失败,信息:record not found', 'RequestId': '295ecc18-4d03-45c2-aa13-7e481eb45aa4', 'Success': False}
Traceback (most recent call last):
File "/opt/conda/bin/accelerate", line 8, in
sys.exit(main())
File "/opt/conda/lib/python3.8/site-packages/accelerate/commands/accelerate_cli.py", line 45, in main
args.func(args)
File "/opt/conda/lib/python3.8/site-packages/accelerate/commands/launch.py", line 979, in launch_command
simple_launcher(args)
File "/opt/conda/lib/python3.8/site-packages/accelerate/commands/launch.py", line 628, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/opt/conda/bin/python', 'facechain/train_text_to_image_lora.py', '--pretrained_model_name_or_path="ly261666/cv_portrait_model"', '--revision="v2.0"', '--sub_path="film/film"', '--dataset_name=/mnt/workspace/.taskdata/train-2cf507bc-ac4e-4a9e-8b11-d85407776d71/imgs', '--output_dataset_name=/mnt/workspace/.taskdata/train-2cf507bc-ac4e-4a9e-8b11-d85407776d71/processed', '--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=/mnt/workspace/.taskdata/train-2cf507bc-ac4e-4a9e-8b11-d85407776d71/output', '--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.
[2023-09-06 23:01:34,314] INFO in Server: p.wait() return: 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions