Merge pull request #1788 from easydiffusion/beta

Hotfix for older accelerate version in the Windows installer
This commit is contained in:
cmdr2 2024-05-30 17:51:32 +05:30 committed by GitHub
commit d6fdb8d5a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -127,6 +127,16 @@ def update_modules():
if module_name in modules_to_log: if module_name in modules_to_log:
print(f"{module_name}: {version(module_name)}") print(f"{module_name}: {version(module_name)}")
# hotfix accelerate
accelerate_version = version("accelerate")
if accelerate_version is None:
install("accelerate", "0.23.0")
else:
accelerate_version = accelerate_version.split(".")
accelerate_version = tuple(map(int, accelerate_version))
if accelerate_version < (0, 23):
install("accelerate", "0.23.0")
### utilities ### utilities