mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-05-02 07:14:27 +02:00
Allow any version of torch/torchvision
This commit is contained in:
parent
023b78d1c9
commit
526fc989c1
@ -59,7 +59,15 @@ def init():
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
allowed_versions, latest_version = get_allowed_versions(module_name, allowed_versions)
|
allowed_versions, latest_version = get_allowed_versions(module_name, allowed_versions)
|
||||||
if version(module_name) not in allowed_versions:
|
|
||||||
|
requires_install = False
|
||||||
|
if module_name in ("torch", "torchvision"):
|
||||||
|
if version(module_name) is None: # allow any torch version
|
||||||
|
requires_install = True
|
||||||
|
elif version(module_name) not in allowed_versions:
|
||||||
|
requires_install = True
|
||||||
|
|
||||||
|
if requires_install:
|
||||||
try:
|
try:
|
||||||
install(module_name, latest_version)
|
install(module_name, latest_version)
|
||||||
except:
|
except:
|
||||||
|
Loading…
Reference in New Issue
Block a user