mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-25 04:29:22 +01:00
fix text_to_video_synthesis_model device (#751)
Co-authored-by: slin000111 <zhaoshilin2015@sina.con>
This commit is contained in:
@@ -58,7 +58,7 @@ class TextToVideoSynthesis(Model):
|
||||
`True`.
|
||||
"""
|
||||
super().__init__(model_dir=model_dir, *args, **kwargs)
|
||||
self.device = torch.device('cuda') if torch.cuda.is_available() \
|
||||
self.device = torch.device(kwargs.get('device', 'cuda')) if torch.cuda.is_available() \
|
||||
else torch.device('cpu')
|
||||
self.config = Config.from_file(
|
||||
osp.join(model_dir, ModelFile.CONFIGURATION))
|
||||
|
||||
Reference in New Issue
Block a user