hpcaitech / Open-Sora

Open-Sora: Democratizing Efficient Video Production for All

Home Page:https://hpcaitech.github.io/Open-Sora/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

请问模型在本地下载好了,如何加载?

fancyicookie opened this issue · comments

commented

因为从hugging上自动下载总是会因为网络问题出错,所以自主下载了传入text encoder和vae这两个模型,下载好之后代码里如何加入这两个模型?

This issue is stale because it has been open for 7 days with no activity.

抱歉我们之前没考虑到用户自主下载的问题。作用一个临时解决方案,huggingface from_pretrained 能支持 cache_dir 这个参数。在 opensora/models/vae/vae.pyopensora/models/text_encoder/t5.py 中找到 from_pretrained,将其中 cache_dir 更换为你的本地文件夹。这个本地文件夹的组织方式应该和 huggingface 的 .cache 一致。具体而言:
Screenshot 2024-04-15 at 00 26 29

> ls models--DeepFloyd--t5-v1_1-xxl
blobs  refs  snapshots

This issue is stale because it has been open for 7 days with no activity.

This issue was closed because it has been inactive for 7 days since being marked as stale.