CrystalNeuro / visual-concept-translator

Code of ICCV 2023 paper titled General Image-to-Image Translation with One-Shot Image Guidance
Apache License 2.0
155 stars 12 forks source link

use accelerate==0.15.0 an error has occurred #1

Closed xddun closed 1 year ago

xddun commented 1 year ago

an error has occurred, Looks like it's a accelerate library issue: TypeError: init() got an unexpected keyword argument 'tpu_use_cluster'

(vct) xiedong@gpu20:/ssd/xiedong/home/InST-main/visual-concept-translator-main$ accelerate launch main.py     --concept_image_dir="./examples/concept_image"     --content_image_dir="./examples/content_image"     --output_image_path="./outputs"     --initializer_token="girl"     --max_train_steps=500     --concept_embedding_num=3     --cross_attention_injection_ratio=0.2     --self_attention_injection_ratio=0.9     --use_l1
Traceback (most recent call last):
  File "/ssd/xiedong/miniconda3/envs/vct/bin/accelerate", line 8, in <module>
    sys.exit(main())
  File "/ssd/xiedong/miniconda3/envs/vct/lib/python3.8/site-packages/accelerate/commands/accelerate_cli.py", line 45, in main
    args.func(args)
  File "/ssd/xiedong/miniconda3/envs/vct/lib/python3.8/site-packages/accelerate/commands/launch.py", line 1000, in launch_command
    defaults = load_config_from_file(args.config_file)
  File "/ssd/xiedong/miniconda3/envs/vct/lib/python3.8/site-packages/accelerate/commands/config/config_args.py", line 64, in load_config_from_file
    return config_class.from_yaml_file(yaml_file=config_file)
  File "/ssd/xiedong/miniconda3/envs/vct/lib/python3.8/site-packages/accelerate/commands/config/config_args.py", line 122, in from_yaml_file
    return cls(**config_dict)
TypeError: __init__() got an unexpected keyword argument 'tpu_use_cluster'
xddun commented 1 year ago

I replaced the graphics card with a V100 CUDA11.6 compatible for PyTorch, but it still reports the same error as before. 重新换了个显卡V100 CUDA11.6 适配的pytorch,还是会报告上面这个错误。

image

CrystalNeuro commented 1 year ago

If the accelerate library doesn't work, I think maybe you can use "python main.py" instead of "accelerate launch main.py".

xddun commented 1 year ago

thank you, after processing in this way, code can indeed run correctly