Resolve __init__.py issues (#1080)

Also drop torchvision. The test passed and didn't fail but
we can't be sure it fixes the __init__.py issue yet.
This commit is contained in:
powderluv
2023-02-22 18:17:00 -08:00
committed by GitHub
parent e1d7fb879c
commit 1c22aa9c8f
5 changed files with 18 additions and 10 deletions

View File

@@ -6,6 +6,16 @@ from distutils.sysconfig import get_python_lib
import fileinput
from pathlib import Path
# Diffusers 0.13.1 fails with transformers __init.py errros in BLIP. So remove it for now until we fork it
pix2pix_file = Path(
get_python_lib()
+ "/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_pix2pix_zero.py"
)
if pix2pix_file.exists():
print("Removing..%s", pix2pix_file)
pix2pix_file.unlink()
path_to_skipfiles = Path(get_python_lib() + "/torch/_dynamo/skipfiles.py")
modules_to_comment = ["abc,", "os,", "posixpath,", "_collections_abc,"]