Browse Source

Update __init__.py

pull/7/head
tin2tin 2 years ago committed by GitHub
parent
commit
76bd5cc442
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 40
      __init__.py

40
__init__.py

@ -62,34 +62,28 @@ class SequencerImportMovieOperator(Operator):
sys.path.append(app_path) sys.path.append(app_path)
pybin = sys.executable pybin = sys.executable
try: import_module(self, "open_clip_torch")
subprocess.call([pybin, "-m", "ensurepip"]) import_module(self, "pytorch_lightning")
except ImportError: import_module(self, "gast")
pass import_module(self, "tensorflow")
subprocess.check_call(
[
pybin,
"-m",
"pip",
"install",
"git+https://github.com/modelscope/modelscope.git",
"--user",
]
)
try: try:
import modelscope import modelscope
except ModuleNotFoundError: except ModuleNotFoundError:
print("Installation of the modelscope module failed") try:
self.report( subprocess.call([pybin, "-m", "ensurepip"])
{"INFO"}, except ImportError:
"Installing modelscope module failed! Try to run Blender as administrator.", pass
subprocess.check_call(
[
pybin,
"-m",
"pip",
"install",
"git+https://github.com/modelscope/modelscope.git",
"--user",
]
) )
return False
import_module(self, "open_clip_torch")
import_module(self, "pytorch_lightning")
import_module(self, "gast")
import_module(self, "tensorflow")
from modelscope.pipelines import pipeline from modelscope.pipelines import pipeline
from modelscope.outputs import OutputKeys from modelscope.outputs import OutputKeys

Loading…
Cancel
Save