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)