+
Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/genmo/mochi_preview/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,15 +518,16 @@ def __init__(
decode_type: str = "full",
decode_args: Optional[Dict[str, Any]] = None,
fast_init=True,
strict_load=True
strict_load=True,
device_id=0,
):
self.device = torch.device("cuda:0")
self.device = torch.device(f"cuda:{device_id}")
self.tokenizer = t5_tokenizer(text_encoder_factory.model_dir)
t = Timer()
self.cpu_offload = cpu_offload
self.decode_args = decode_args or {}
self.decode_type = decode_type
init_id = "cpu" if cpu_offload else 0
init_id = "cpu" if cpu_offload else device_id
with t("load_text_encoder"):
self.text_encoder = text_encoder_factory.get_model(
local_rank=0,
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载