Merge pull request #1808 from easydiffusion/beta

temp hotfix for rocm torch
This commit is contained in:
cmdr2 2024-06-13 14:06:14 +05:30 committed by GitHub
commit dea962dc89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -141,7 +141,6 @@ def update_modules():
else:
sdkit_version = version_str_to_tuple(sdkit_version_str)
legacy_sdkit_version = version_str_to_tuple(legacy_sdkit_version_str)
torch_version = version_str_to_tuple(version("torch"))
if sdkit_version[:3] <= legacy_sdkit_version[:3]: # and torch_version < (0, 13):
# stick to diffusers 0.21.4, since it preserves torch 0.11+ compatibility.
@ -152,6 +151,7 @@ def update_modules():
install_pkg_if_necessary("sdkit", legacy_sdkit_version_str)
install_pkg_if_necessary("diffusers", legacy_diffusers_version_str)
else:
torch_version = version_str_to_tuple(version("torch"))
if torch_version < (1, 13):
# install the gpu-compatible torch (if necessary), instead of the default CPU-only one
# from the diffusers dependency chain