(self, prompt: str, t5_pretrained_path: str, t5_device: str)
| 69 | CATEGORY = "Magi" |
| 70 | |
| 71 | def encode(self, prompt: str, t5_pretrained_path: str, t5_device: str): |
| 72 | model_config = ModelConfig(model_name="videodit_ardf") |
| 73 | config = MagiConfig(model_config=model_config, runtime_config=RuntimeConfig(), engine_config=EngineConfig()) |
| 74 | config.runtime_config.t5_pretrained = t5_pretrained_path |
| 75 | config.runtime_config.t5_device = t5_device |
| 76 | config.model_config.caption_max_length = 800 |
| 77 | |
| 78 | caption_embs, emb_masks = get_txt_embeddings(prompt, config) |
| 79 | return ([caption_embs, emb_masks],) |
| 80 | |
| 81 | |
| 82 | class MagiImageLoader: |
nothing calls this directly
no test coverage detected