Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accelerate config step during installation won't work #67

Closed
HanJammer opened this issue Jan 25, 2023 · 2 comments
Closed

Accelerate config step during installation won't work #67

HanJammer opened this issue Jan 25, 2023 · 2 comments

Comments

@HanJammer
Copy link

HanJammer commented Jan 25, 2023

Basically when I try to run accelerate config it will throw a bunch of errors:

(venv) PS G:!AI\SD\kohya_ss> accelerate config
------------------------------------------------------------------------------------------------------------------------In which compute environment are you running?
Please select a choice using the arrow or number keys, and selecting with enter
Traceback (most recent call last):
File "C:\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "G:!AI\SD\kohya_ss\venv\Scripts\accelerate.exe_main
.py", line 7, in
File "G:!AI\SD\kohya_ss\venv\lib\site-packages\accelerate\commands\accelerate_cli.py", line 45, in main
args.func(args)
File "G:!AI\SD\kohya_ss\venv\lib\site-packages\accelerate\commands\config\config.py", line 67, in config_command
config = get_user_input()
File "G:!AI\SD\kohya_ss\venv\lib\site-packages\accelerate\commands\config\config.py", line 32, in get_user_input
compute_environment = _ask_options(
File "G:!AI\SD\kohya_ss\venv\lib\site-packages\accelerate\commands\config\config_utils.py", line 58, in _ask_options
result = menu.run(default_choice=default)
File "G:!AI\SD\kohya_ss\venv\lib\site-packages\accelerate\commands\menu\selection_menu.py", line 118, in run
choice = self.handle_input()
File "G:!AI\SD\kohya_ss\venv\lib\site-packages\accelerate\commands\menu\input.py", line 73, in handle_input
char = get_character()
File "G:!AI\SD\kohya_ss\venv\lib\site-packages\accelerate\commands\menu\keymap.py", line 114, in get_character
char = get_raw_chars()
File "G:!AI\SD\kohya_ss\venv\lib\site-packages\accelerate\commands\menu\keymap.py", line 77, in get_raw_chars
if ch.encode(encoding) in (b"\x00", b"\xe0"):
UnicodeEncodeError: 'mbcs' codec can't encode characters in position 0--1: invalid character

I'm running Polish version of Windows and 852 (OEM - Latin II) codepage for the cmd / powershell - but I tried to switch to Unicode few days ago and it was failing the same way.

Edit: it's pretty much impossible to select options using arrows (will throw the error immediately) and the number keys won't work correctly too. For now I left the default options which should work.

@bmaltais
Copy link
Owner

Please delete the venv and reso the install using the latest instructions... particularly important is this updated step:

python -m venv venv

This should ensure that local packages will not conflict with kohya GUI.

@HanJammer
Copy link
Author

This issue is still present and has nothing to do with venv - I would rather suspect keyboard layout setting or maybe OS codepage... for now using the numbers on the keyboard work but trying to use cursor keys immediately breaks the installation.

Cauldrath pushed a commit to Cauldrath/kohya_ss that referenced this issue Apr 5, 2023
Load vae in the same way as stable-diffusion-webui
DoubleCake pushed a commit to DoubleCake/kohya_ss that referenced this issue Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants