diff --git a/modelscope/models/cv/video_depth_estimation/dro_model.py b/modelscope/models/cv/video_depth_estimation/dro_model.py index 761b4b71..ccc0d0a7 100644 --- a/modelscope/models/cv/video_depth_estimation/dro_model.py +++ b/modelscope/models/cv/video_depth_estimation/dro_model.py @@ -52,7 +52,8 @@ class DROEstimation(TorchModel): if torch.cuda.is_available(): model_wrapper = self.model_wrapper.to('cuda') else: - raise RuntimeError('cuda is not available') + model_wrapper = self.model_wrapper + print('cuda is not available, use cpu') # Set to eval mode model_wrapper.eval() diff --git a/tests/pipelines/test_video_depth_estimation.py b/tests/pipelines/test_video_depth_estimation.py index 77cb4b9b..30ca3b33 100644 --- a/tests/pipelines/test_video_depth_estimation.py +++ b/tests/pipelines/test_video_depth_estimation.py @@ -15,8 +15,8 @@ class VideoDepthEstimationTest(unittest.TestCase, DemoCompatibilityCheck): self.task = 'video-depth-estimation' self.model_id = 'damo/cv_dro-resnet18_video-depth-estimation_indoor' - @unittest.skipUnless(test_level() >= 3, 'skip test in current test level') - def test_image_depth_estimation(self): + @unittest.skipUnless(test_level() >= 0, 'skip test in current test level') + def test_video_depth_estimation(self): input_location = 'data/test/videos/video_depth_estimation.mp4' estimator = pipeline(Tasks.video_depth_estimation, model=self.model_id) result = estimator(input_location)