Instructions to use ali-vilab/MS-Image2Video with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- OpenCLIP
How to use ali-vilab/MS-Image2Video with OpenCLIP:
import open_clip model, preprocess_train, preprocess_val = open_clip.create_model_and_transforms('hf-hub:ali-vilab/MS-Image2Video') tokenizer = open_clip.get_tokenizer('hf-hub:ali-vilab/MS-Image2Video') - Notebooks
- Google Colab
- Kaggle
ConnectionResetError: [Errno 104] Connection reset by peer
while importing got this error
this is the code
from modelscope.pipelines import pipeline
from modelscope.outputs import OutputKeys
pipe = pipeline(task='image-to-video', model='damo/Image-to-Video', model_revision='v1.1.0')
IMG_PATH = "./10251.png"
output_video_path = pipe(IMG_PATH, output_video='./output.mp4')[OutputKeys.OUTPUT_VIDEO]
print(output_video_path)
Tried more than 20 times , still no luck
I apologize for the inconvenience caused. It could be due to the large size of the model files. May I suggest trying again in a different network environment?
I have two suggestions for you to try:
It is possible that the model file is too large, and the download time (>8 minutes) is causing Colab to disconnect. Therefore, I suggest trying it on a machine with a stable network connection.
You can try the following example code:
from modelscope.pipelines import pipeline
from modelscope.outputs import OutputKeys
from modelscope import snapshot_download
model_dir = snapshot_download('damo/Image-to-Video', revision='v1.1.0')
pipe = pipeline(task='image-to-video', model= model_dir, model_revision='v1.1.0')
IMG_PATH = "./test.png"
output_video_path = pipe(IMG_PATH, output_video='./output.mp4')[OutputKeys.OUTPUT_VIDEO]
print(output_video_path)
