derrian-distro / LoRA_Easy_Training_Scripts

A UI made in Pyside6 to make training LoRA/LoCon and other LoRA type models in sd-scripts easy
GNU General Public License v3.0
998 stars 101 forks source link

Error when trying to Install DEV #203

Closed LegionInstaller closed 3 months ago

LegionInstaller commented 3 months ago

Hello,

Everytime I try to Install the dev variant of this

I get this specific error [The system cannot move the file to a different disk drive]

Traceback (most recent call last): File "E:\KI-LoraTraining\LoRA_Easy_Training_Scripts\backend\installer.py", line 199, in main() File "E:\KI-LoraTraining\LoRA_Easy_Training_Scripts\backend\installer.py", line 191, in main setup_accelerate(PLATFORM) File "E:\KI-LoraTraining\LoRA_Easy_Training_Scripts\backend\installer.py", line 83, in setup_accelerate shutil.move("default_config.yaml", str(path.resolve())) File "D:\Python 3.10.6\lib\shutil.py", line 835, in move copy_function(src, real_dst) File "D:\Python 3.10.6\lib\shutil.py", line 434, in copy2 copyfile(src, dst, follow_symlinks=follow_symlinks) File "D:\Python 3.10.6\lib\shutil.py", line 256, in copyfile with open(dst, 'wb') as fdst: FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\\.cache\huggingface\accelerate\default_config.yaml' Traceback (most recent call last): File "E:\KI-LoraTraining\LoRA_Easy_Training_Scripts\install.py", line 79, in main() File "E:\KI-LoraTraining\LoRA_Easy_Training_Scripts\install.py", line 75, in main subprocess.check_call(f"{python} installer.py local", shell=sys.platform == "linux") File "D:\Python 3.10.6\lib\subprocess.py", line 369, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command 'D:\Python 3.10.6\python.exe installer.py local' returned non-zero exit status 1.

Jelosus2 commented 3 months ago

Hello there, you have 2 options.

  1. Installing the trainer in the same disk as your Operative System.
  2. Create the accelerate config manually.

If you want the second I can help you :)

LegionInstaller commented 3 months ago

Hello there, you have 2 options.

  1. Installing the trainer in the same disk as your Operative System.
  2. Create the accelerate config manually.

If you want the second I can help you :)

Hey There! Sorry for the late reply, but yes, I would appreciate it if you could show me how to configure it manually.

Jelosus2 commented 3 months ago
  1. Open the start menu with Win + R.
  2. Type %USERPROFILE% on it and hit enter, now you should be in the root folder of your user.
  3. Now you should see a folder named .cache, if you don't see, it create it.
  4. Inside the .cache folder there should be another one called huggingface, again if you don't see it, create it.
  5. Inside the huggingface folder there should be another one called accelerate, if you don't see it, create it.
  6. Inside the accelerate folder open a git bash (Right click on an empty space of the folders content and select "Git Bash Here") and run the command touch default_config.yaml.
  7. Open the file preferably with visual studio code or notepad++ and paste this content:
    command_file: null
    commands: null
    compute_environment: LOCAL_MACHINE
    deepspeed_config: {}
    distributed_type: 'NO'
    downcase_fp16: 'NO'
    dynamo_backend: 'NO'
    fsdp_config: {}
    gpu_ids: '0'
    machine_rank: 0
    main_process_ip: null
    main_process_port: null
    main_training_function: main
    megatron_lm_config: {}
    mixed_precision: bf16
    num_machines: 1
    num_processes: 1
    rdzv_backend: static
    same_network: true
    tpu_name: null
    tpu_zone: null
    use_cpu: false
  8. Save the file.
  9. Run the install.bat again.
  10. Enjoy, I hope.
LegionInstaller commented 3 months ago
  1. Open the start menu with Win + R.
  2. Type %USERPROFILE% on it and hit enter, now you should be in the root folder of your user.
  3. Now you should see a folder named .cache, if you don't see, it create it.
  4. Inside the .cache folder there should be another one called huggingface, again if you don't see it, create it.
  5. Inside the huggingface folder there should be another one called accelerate, if you don't see it, create it.
  6. Inside the accelerate folder open a git bash (Right click on an empty space of the folders content and select "Git Bash Here") and run the command touch default_config.yaml.
  7. Open the file preferably with visual studio code or notepad++ and paste this content:
command_file: null
commands: null
compute_environment: LOCAL_MACHINE
deepspeed_config: {}
distributed_type: 'NO'
downcase_fp16: 'NO'
dynamo_backend: 'NO'
fsdp_config: {}
gpu_ids: '0'
machine_rank: 0
main_process_ip: null
main_process_port: null
main_training_function: main
megatron_lm_config: {}
mixed_precision: bf16
num_machines: 1
num_processes: 1
rdzv_backend: static
same_network: true
tpu_name: null
tpu_zone: null
use_cpu: false
  1. Save the file.
  2. Run the install.bat again.
  3. Enjoy, I hope.

Ah! It worked Thank You very much!

samelias commented 2 months ago

Got the same symptoms because there was already a file named \.cache\huggingface\accelerate with no extension and containing the same config you're trying to push into \.cache\huggingface\accelerate\default_config.yaml Either created by an older installer script on master branch or from a different tool that uses accelerate, not sure.

As a result creation of folder \.cache\huggingface\accelerate fails silently due to duplicate name, then the move fails with No such file or directory: '\.cache\huggingface\accelerate\default_config.yaml'