Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Jun 23, 2023
1 parent d0aa762 commit 08c2105
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions setup/setup_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,10 @@ def env_var_exists(var_name):
)

if not os.path.exists(source_accelerate_config_file):
log.info(
log.debug(
f'Could not find the accelerate configuration file in {source_accelerate_config_file}. Please configure accelerate manually by runningthe option in the menu.'
)
run_cmd('accelerate config')

log.debug(
f'Source accelerate config location: {source_accelerate_config_file}'
Expand Down Expand Up @@ -159,15 +160,15 @@ def env_var_exists(var_name):
f'Copied accelerate config file to: {target_config_location}'
)
else:
run_cmd('accelerate config')
log.debug(
'Could not automatically configure accelerate. Please manually configure accelerate with the option in the menu or with: accelerate config.'
)
run_cmd('accelerate config')
else:
run_cmd('accelerate config')
log.debug(
'Could not automatically configure accelerate. Please manually configure accelerate with the option in the menu or with: accelerate config.'
)
run_cmd('accelerate config')


def check_torch():
Expand Down Expand Up @@ -413,7 +414,7 @@ def ensure_base_requirements():

def run_cmd(run_cmd):
try:
subprocess.run(run_cmd, check=True)
subprocess.run(run_cmd, shell=True, check=False, env=os.environ)
except subprocess.CalledProcessError as e:
print(f'Error occurred while running command: {run_cmd}')
print(f'Error: {e}')
Expand Down
2 changes: 1 addition & 1 deletion setup/setup_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def install_kohya_ss(platform_requirements_file):
# Upgrade pip if needed
setup_common.install('--upgrade pip')
setup_common.install_requirements(platform_requirements_file, check_no_verify_flag=False)
# setup_common.configure_accelerate()
setup_common.configure_accelerate()
# run_cmd(f'accelerate config')


Expand Down

0 comments on commit 08c2105

Please sign in to comment.