modelscope / modelscope/DiffSynth-Studio

不能使用本地路径Exception: Invalid repo_id: model, must be of format namespace/name

Open
#1,524 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
13.1k
Forks
1.3k
Avg merge
13h 12m
Merged PRs (30d)
45

Description

代码:
accelerate launch examples/boogu_image/model_training/train.py
--dataset_base_path "/workspace/lk/model/llm/multimodal/image_lora"
--dataset_metadata_path "/workspace/lk/model/llm/multimodal/image_lora/metadata_boogu.csv"
--max_pixels 1048576
--dataset_repeat 5
--model_id_with_origin_paths "dit:/workspace/lk/model/llm/vlm/Boogu-Image-01-Edit/transformer/.safetensors,mllm:/workspace/lk/model/llm/vlm/Boogu-Image-01-Edit/mllm/.safetensors,vae:/workspace/lk/model/llm/vlm/Boogu-Image-01-Edit/vae/*.safetensors"
--processor_path "/workspace/lk/model/llm/vlm/Boogu-Image-01-Edit"
--learning_rate 1e-4
--num_epochs 5
--remove_prefix_in_ckpt "pipe.dit."
--output_path "/workspace/lk/output/vlm/Boogu-Image-0.1-Edit_lora"
--lora_base_model "dit"
--lora_target_modules "to_q,to_k,to_v,to_out.0,img_to_q,img_to_k,img_to_v,img_out,instruct_to_q,instruct_to_k,instruct_to_v,instruct_out"
--lora_rank 32
--use_gradient_checkpointing
--dataset_num_workers 8
--find_unused_parameters
--data_file_keys "image,edit_image,prompt"
--extra_inputs "edit_image"
报错:

Traceback (most recent call last):
File "/workspace/lk/model/server/DiffSynth-Studio/examples/boogu_image/model_training/train.py", line 106, in
model = BooguImageTrainingModule(
File "/workspace/lk/model/server/DiffSynth-Studio/examples/boogu_image/model_training/train.py", line 29, in init
self.pipe = BooguImagePipeline.from_pretrained(torch_dtype=torch.bfloat16, device=device, model_configs=model_configs, processor_config=processor_config)
File "/workspace/lk/model/server/DiffSynth-Studio/diffsynth/pipelines/boogu_image.py", line 59, in from_pretrained
model_pool = pipe.download_and_load_models(model_configs, vram_limit)
File "/workspace/lk/model/server/DiffSynth-Studio/diffsynth/diffusion/base_pipeline.py", line 300, in download_and_load_models
model_config.download_if_necessary()
File "/workspace/lk/model/server/DiffSynth-Studio/diffsynth/core/loader/config.py", line 100, in download_if_necessary
self.download()
File "/workspace/lk/model/server/DiffSynth-Studio/diffsynth/core/loader/config.py", line 66, in download
snapshot_download(
File "/root/miniforge3/envs/diffSynth_studio/lib/python3.10/site-packages/modelscope/hub/snapshot_download.py", line 108, in snapshot_download
return _snapshot_download(
File "/root/miniforge3/envs/diffSynth_studio/lib/python3.10/site-packages/modelscope/hub/snapshot_download.py", line 254, in _snapshot_download
endpoint = _api.get_endpoint_for_read(
File "/root/miniforge3/envs/diffSynth_studio/lib/python3.10/site-packages/modelscope/hub/api.py", line 332, in get_endpoint_for_read
if not self.repo_exists(
File "/root/miniforge3/envs/diffSynth_studio/lib/python3.10/site-packages/modelscope/hub/api.py", line 379, in repo_exists
raise Exception('Invalid repo_id: %s, must be of format namespace/name' % repo_type)
Exception: Invalid repo_id: model, must be of format namespace/name
Traceback (most recent call last):
File "/root/miniforge3/envs/diffSynth_studio/bin/accelerate", line 8, in
sys.exit(main())
File "/root/miniforge3/envs/diffSynth_studio/lib/python3.10/site-packages/accelerate/commands/accelerate_cli.py", line 50, in main
args.func(args)
File "/root/miniforge3/envs/diffSynth_studio/lib/python3.10/site-packages/accelerate/commands/launch.py", line 1235, in launch_command
simple_launcher(args)
File "/root/miniforge3/envs/diffSynth_studio/lib/python3.10/site-packages/accelerate/commands/launch.py", line 823, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/root/miniforge3/envs/diffSynth_studio/bin/python', 'examples/boogu_image/model_training/train.py', '--dataset_base_path', '/workspace/lk/model/llm/multimodal/image_lora', '--dataset_metadata_path', '/workspace/lk/model/llm/multimodal/image_lora/metadata_boogu.csv', '--max_pixels', '1048576', '--dataset_repeat', '5', '--model_id_with_origin_paths', 'dit:/workspace/lk/model/llm/vlm/Boogu-Image-01-Edit/transformer/.safetensors,mllm:/workspace/lk/model/llm/vlm/Boogu-Image-01-Edit/mllm/.safetensors,vae:/workspace/lk/model/llm/vlm/Boogu-Image-01-Edit/vae/*.safetensors', '--processor_path', '/workspace/lk/model/llm/vlm/Boogu-Image-01-Edit', '--learning_rate', '1e-4', '--num_epochs', '5', '--remove_prefix_in_ckpt', 'pipe.dit.', '--output_path', '/workspace/lk/output/vlm/Boogu-Image-0.1-Edit_lora', '--lora_base_model', 'dit', '--lora_target_modules', 'to_q,to_k,to_v,to_out.0,img_to_q,img_to_k,img_to_v,img_out,instruct_to_q,instruct_to_k,instruct_to_v,instruct_out', '--lora_rank', '32', '--use_gradient_checkpointing', '--dataset_num_workers', '8', '--find_unused_parameters', '--data_file_keys', 'image,edit_image,prompt', '--extra_inputs', 'edit_image']' returned non-zero exit status 1.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with examples/boogu_image/model_training/train.py at line 106 and follow model_configs into diffsynth/core/loader/config.py at line 66. Re-run the reported accelerate command, then inspect how the local paths from --model_id_with_origin_paths reach ModelScope snapshot_download. Done means the command accepts those local model files without raising the invalid repo_id exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.