|
|
@ -62,11 +62,18 @@ class SequencerImportMovieOperator(Operator): |
|
|
|
sys.path.append(app_path) |
|
|
|
sys.path.append(app_path) |
|
|
|
pybin = sys.executable |
|
|
|
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: |
|
|
|
try: |
|
|
|
subprocess.call([pybin, "-m", "ensurepip"]) |
|
|
|
subprocess.call([pybin, "-m", "ensurepip"]) |
|
|
|
except ImportError: |
|
|
|
except ImportError: |
|
|
|
pass |
|
|
|
pass |
|
|
|
|
|
|
|
|
|
|
|
subprocess.check_call( |
|
|
|
subprocess.check_call( |
|
|
|
[ |
|
|
|
[ |
|
|
|
pybin, |
|
|
|
pybin, |
|
|
@ -77,19 +84,6 @@ class SequencerImportMovieOperator(Operator): |
|
|
|
"--user", |
|
|
|
"--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.pipelines import pipeline |
|
|
|
from modelscope.outputs import OutputKeys |
|
|
|
from modelscope.outputs import OutputKeys |
|
|
|