mirror of https://github.com/bmaltais/kohya_ss
Remove torch 1 support from code
parent
1deb505922
commit
93a181f55b
16
README.md
16
README.md
|
|
@ -625,6 +625,9 @@ ControlNet-LLLite, a novel method for ControlNet with SDXL, is added. See [docum
|
||||||
|
|
||||||
## Change History
|
## Change History
|
||||||
|
|
||||||
|
* 2023/10/08 (v22.1.0)
|
||||||
|
- Remove support for torch 1 to align with kohya_ss sd-scripts code base.
|
||||||
|
|
||||||
* 2023/10/01 (v22.0.0)
|
* 2023/10/01 (v22.0.0)
|
||||||
- Merging main branch of sd-scripts:
|
- Merging main branch of sd-scripts:
|
||||||
- [SAI Model Spec](https://github.com/Stability-AI/ModelSpec) metadata is now supported partially. `hash_sha256` is not supported yet.
|
- [SAI Model Spec](https://github.com/Stability-AI/ModelSpec) metadata is now supported partially. `hash_sha256` is not supported yet.
|
||||||
|
|
@ -648,16 +651,3 @@ ControlNet-LLLite, a novel method for ControlNet with SDXL, is added. See [docum
|
||||||
- Update wandb module version
|
- Update wandb module version
|
||||||
- Add support for Chinese zh-CN localisation. You can use it with `.\gui.bat --language=zh-CN`
|
- Add support for Chinese zh-CN localisation. You can use it with `.\gui.bat --language=zh-CN`
|
||||||
- Add presets support to `Finetuning`. You can add your own finetuning user presets under the `/presets/finetune/user_presets` folder.
|
- Add presets support to `Finetuning`. You can add your own finetuning user presets under the `/presets/finetune/user_presets` folder.
|
||||||
|
|
||||||
* 2023/09/23 (v21.8.10)
|
|
||||||
- Minor point upgrade. Mostly adding a new preset.
|
|
||||||
|
|
||||||
* 2023/08/05 (v21.8.9)
|
|
||||||
- Update sd-script to caode as of Sept 3 2023
|
|
||||||
* ControlNet-LLLite is added. See documentation for details.
|
|
||||||
* JPEG XL is supported. #786
|
|
||||||
* Peak memory usage is reduced. #791
|
|
||||||
* Input perturbation noise is added. See #798 for details.
|
|
||||||
* Dataset subset now has caption_prefix and caption_suffix options. The strings are added to the beginning and the end of the captions before shuffling. You can specify the options in .toml.
|
|
||||||
* Other minor changes.
|
|
||||||
- Added support for Chinese locallisation
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
@echo off
|
|
||||||
|
|
||||||
call gui.bat --language zh-CN --inbrowser --share --headless
|
|
||||||
|
|
||||||
echo 完成。
|
|
||||||
|
|
||||||
pause
|
|
||||||
endlocal
|
|
||||||
|
|
@ -13,7 +13,7 @@ huggingface-hub==0.15.1
|
||||||
# for loading Diffusers' SDXL
|
# for loading Diffusers' SDXL
|
||||||
invisible-watermark==0.2.0
|
invisible-watermark==0.2.0
|
||||||
lion-pytorch==0.0.6
|
lion-pytorch==0.0.6
|
||||||
lycoris_lora==1.8.3
|
lycoris_lora==1.9.0
|
||||||
# for BLIP captioning
|
# for BLIP captioning
|
||||||
# requests==2.28.2
|
# requests==2.28.2
|
||||||
# timm==0.6.12
|
# timm==0.6.12
|
||||||
|
|
|
||||||
|
|
@ -98,31 +98,31 @@ def sync_bits_and_bytes_files():
|
||||||
log.error(f'An unexpected error occurred: {e}')
|
log.error(f'An unexpected error occurred: {e}')
|
||||||
|
|
||||||
|
|
||||||
def install_kohya_ss_torch1():
|
# def install_kohya_ss_torch1():
|
||||||
setup_common.check_repo_version()
|
# setup_common.check_repo_version()
|
||||||
setup_common.check_python()
|
# setup_common.check_python()
|
||||||
|
|
||||||
# Upgrade pip if needed
|
# # Upgrade pip if needed
|
||||||
setup_common.install('--upgrade pip')
|
# setup_common.install('--upgrade pip')
|
||||||
|
|
||||||
if setup_common.check_torch() == 2:
|
# if setup_common.check_torch() == 2:
|
||||||
input(
|
# input(
|
||||||
f'{YELLOW}\nTorch 2 is already installed in the venv. To install Torch 1 delete the venv and re-run setup.bat\n\nHit enter to continue...{RESET_COLOR}'
|
# f'{YELLOW}\nTorch 2 is already installed in the venv. To install Torch 1 delete the venv and re-run setup.bat\n\nHit enter to continue...{RESET_COLOR}'
|
||||||
)
|
|
||||||
return
|
|
||||||
|
|
||||||
# setup_common.install(
|
|
||||||
# 'torch==1.12.1+cu116 torchvision==0.13.1+cu116 --index-url https://download.pytorch.org/whl/cu116',
|
|
||||||
# 'torch torchvision'
|
|
||||||
# )
|
# )
|
||||||
# setup_common.install(
|
# return
|
||||||
# 'https://github.com/C43H66N12O12S2/stable-diffusion-webui/releases/download/f/xformers-0.0.14.dev0-cp310-cp310-win_amd64.whl -U -I --no-deps',
|
|
||||||
# 'xformers-0.0.14'
|
# # setup_common.install(
|
||||||
# )
|
# # 'torch==1.12.1+cu116 torchvision==0.13.1+cu116 --index-url https://download.pytorch.org/whl/cu116',
|
||||||
setup_common.install_requirements('requirements_windows_torch1.txt', check_no_verify_flag=False)
|
# # 'torch torchvision'
|
||||||
sync_bits_and_bytes_files()
|
# # )
|
||||||
setup_common.configure_accelerate(run_accelerate=True)
|
# # setup_common.install(
|
||||||
# run_cmd(f'accelerate config')
|
# # 'https://github.com/C43H66N12O12S2/stable-diffusion-webui/releases/download/f/xformers-0.0.14.dev0-cp310-cp310-win_amd64.whl -U -I --no-deps',
|
||||||
|
# # 'xformers-0.0.14'
|
||||||
|
# # )
|
||||||
|
# setup_common.install_requirements('requirements_windows_torch1.txt', check_no_verify_flag=False)
|
||||||
|
# sync_bits_and_bytes_files()
|
||||||
|
# setup_common.configure_accelerate(run_accelerate=True)
|
||||||
|
# # run_cmd(f'accelerate config')
|
||||||
|
|
||||||
|
|
||||||
def install_kohya_ss_torch2():
|
def install_kohya_ss_torch2():
|
||||||
|
|
@ -177,23 +177,24 @@ def main_menu():
|
||||||
print('')
|
print('')
|
||||||
|
|
||||||
if choice == '1':
|
if choice == '1':
|
||||||
while True:
|
|
||||||
print('1. Torch 1 (legacy, no longer supported. Will be removed in v21.9.x)')
|
|
||||||
print('2. Torch 2 (recommended)')
|
|
||||||
print('3. Cancel')
|
|
||||||
choice_torch = input('\nEnter your choice: ')
|
|
||||||
print('')
|
|
||||||
|
|
||||||
if choice_torch == '1':
|
|
||||||
install_kohya_ss_torch1()
|
|
||||||
break
|
|
||||||
elif choice_torch == '2':
|
|
||||||
install_kohya_ss_torch2()
|
install_kohya_ss_torch2()
|
||||||
break
|
# while True:
|
||||||
elif choice_torch == '3':
|
# print('1. Torch 1 (legacy, no longer supported. Will be removed in v21.9.x)')
|
||||||
break
|
# print('2. Torch 2 (recommended)')
|
||||||
else:
|
# print('3. Cancel')
|
||||||
print('Invalid choice. Please enter a number between 1-3.')
|
# choice_torch = input('\nEnter your choice: ')
|
||||||
|
# print('')
|
||||||
|
|
||||||
|
# if choice_torch == '1':
|
||||||
|
# install_kohya_ss_torch1()
|
||||||
|
# break
|
||||||
|
# elif choice_torch == '2':
|
||||||
|
# install_kohya_ss_torch2()
|
||||||
|
# break
|
||||||
|
# elif choice_torch == '3':
|
||||||
|
# break
|
||||||
|
# else:
|
||||||
|
# print('Invalid choice. Please enter a number between 1-3.')
|
||||||
elif choice == '2':
|
elif choice == '2':
|
||||||
cudann_install()
|
cudann_install()
|
||||||
elif choice == '3':
|
elif choice == '3':
|
||||||
|
|
|
||||||
|
|
@ -109,9 +109,6 @@ def main():
|
||||||
|
|
||||||
if args.requirements:
|
if args.requirements:
|
||||||
setup_common.install_requirements(args.requirements, check_no_verify_flag=True)
|
setup_common.install_requirements(args.requirements, check_no_verify_flag=True)
|
||||||
else:
|
|
||||||
if torch_ver == 1:
|
|
||||||
setup_common.install_requirements('requirements_windows_torch1.txt', check_no_verify_flag=True)
|
|
||||||
else:
|
else:
|
||||||
setup_common.install_requirements('requirements_windows_torch2.txt', check_no_verify_flag=True)
|
setup_common.install_requirements('requirements_windows_torch2.txt', check_no_verify_flag=True)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue