ModelScope人肉下载模型文件。也是同样的报错?

ModelScope人肉下载模型文件。也是同样的报错?image.png

展开
收起
真的很搞笑 2023-09-12 19:35:24 239 分享 版权
2 条回答
写回答
取消 提交回答
  • 我也遇到下载失败问题。。。snapshot_download和library下载都是小文件可以下载,大文件下载30多秒就会“远程主机强迫关闭了一个现有的连接”。。哎。。

    2023-10-25 11:21:44
    赞同 展开评论
  • 下载模型用snapshot_download比较方便,您试一下下面的代码,我这能跑。
    import cv2
    from modelscope.outputs import OutputKeys
    from modelscope.pipelines import pipeline
    from modelscope.utils.constant import Tasks
    from modelscope.hub.snapshot_download import snapshot_download

    model_dir = snapshot_download('damo/cv_unet-image-face-fusion_damo')

    image_face_fusion = pipeline(Tasks.image_face_fusion,
    model=model_dir)
    template_path = 'https://modelscope.oss-cn-beijing.aliyuncs.com/test/images/facefusion_template.jpg'
    user_path = 'https://modelscope.oss-cn-beijing.aliyuncs.com/test/images/facefusion_user.jpg'
    result = image_face_fusion(dict(template=template_path, user=user_path))

    cv2.imwrite('result.png', result[OutputKeys.OUTPUT_IMG])
    print(model_dir)
    print('finished!'),此回答整理自钉群“魔搭ModelScope开发者联盟群 ①”

    2023-09-13 07:48:56
    赞同 展开评论

包含图像分类、图像生成、人体人脸识别、动作识别、目标分割、视频生成、卡通画、视觉评价、三维视觉等多个领域

热门讨论

热门文章

还有其他疑问?
咨询AI助理