(self)
| 420 | self.data_sender[data_bootstrap_room] = DataSender(self.data_mgr, data_bootstrap_addr, data_bootstrap_room) |
| 421 | |
| 422 | def load_models(self): |
| 423 | self.logger.info("Loading Encoder Models...") |
| 424 | |
| 425 | # T5 Text Encoder |
| 426 | text_encoders = load_wan_text_encoder(self.config) |
| 427 | self.text_encoder = text_encoders[0] if text_encoders else None |
| 428 | |
| 429 | # CLIP Image Encoder (Optional per usage in wan_i2v.py) |
| 430 | if self.config.get("use_image_encoder", False): |
| 431 | self.image_encoder = load_wan_image_encoder(self.config) |
| 432 | |
| 433 | # VAE Encoder (Required for I2V) |
| 434 | # Note: wan_i2v.py logic: if vae_encoder is None: raise RuntimeError |
| 435 | # But we only load if needed or always? Let's check the config flags. |
| 436 | # It seems always loaded for I2V task, but might be offloaded. |
| 437 | # For simplicity of this service, we load it if the task implies it or just try to load. |
| 438 | # But `load_wan_vae_encoder` will look at the config. |
| 439 | self.vae_encoder = load_wan_vae_encoder(self.config) |
| 440 | |
| 441 | self.logger.info("Encoder Models loaded successfully.") |
| 442 | |
| 443 | def _get_latent_shape_with_lat_hw(self, latent_h, latent_w): |
| 444 | return [ |
no test coverage detected