|
|
|
@ -62,11 +62,18 @@ class SequencerImportMovieOperator(Operator):
|
|
|
|
|
sys.path.append(app_path) |
|
|
|
|
pybin = sys.executable |
|
|
|
|
|
|
|
|
|
import_module(self, "open_clip_torch") |
|
|
|
|
import_module(self, "pytorch_lightning") |
|
|
|
|
import_module(self, "gast") |
|
|
|
|
import_module(self, "tensorflow") |
|
|
|
|
|
|
|
|
|
try: |
|
|
|
|
import modelscope |
|
|
|
|
except ModuleNotFoundError: |
|
|
|
|
try: |
|
|
|
|
subprocess.call([pybin, "-m", "ensurepip"]) |
|
|
|
|
except ImportError: |
|
|
|
|
pass |
|
|
|
|
|
|
|
|
|
subprocess.check_call( |
|
|
|
|
[ |
|
|
|
|
pybin, |
|
|
|
@ -77,19 +84,6 @@ class SequencerImportMovieOperator(Operator):
|
|
|
|
|
"--user", |
|
|
|
|
] |
|
|
|
|
) |
|
|
|
|
try: |
|
|
|
|
import modelscope |
|
|
|
|
except ModuleNotFoundError: |
|
|
|
|
print("Installation of the modelscope module failed") |
|
|
|
|
self.report( |
|
|
|
|
{"INFO"}, |
|
|
|
|
"Installing modelscope module failed! Try to run Blender as administrator.", |
|
|
|
|
) |
|
|
|
|
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.outputs import OutputKeys |
|
|
|
|