构建“更宽”的 decoder;深度增强(IdentityConv2d+ReLU)已在 TAEHV 内部完成。 - 不创建 small / 不做移植 - base_ckpt_path 参数保留但不使用(接口兼容) 返回:big (单个模型)
(new_channels=[512, 256, 128, 128], device="cuda", dtype=torch.bfloat16, new_latent_channels=None)
| 310 | |
| 311 | |
| 312 | def build_tcdecoder(new_channels=[512, 256, 128, 128], device="cuda", dtype=torch.bfloat16, new_latent_channels=None): |
| 313 | """ |
| 314 | 构建“更宽”的 decoder;深度增强(IdentityConv2d+ReLU)已在 TAEHV 内部完成。 |
| 315 | - 不创建 small / 不做移植 |
| 316 | - base_ckpt_path 参数保留但不使用(接口兼容) |
| 317 | |
| 318 | 返回:big (单个模型) |
| 319 | """ |
| 320 | if new_latent_channels is not None: |
| 321 | big = TAEHV(checkpoint_path=None, channels=new_channels, latent_channels=new_latent_channels).to(device).to(dtype).train() |
| 322 | else: |
| 323 | big = TAEHV(checkpoint_path=None, channels=new_channels).to(device).to(dtype).train() |
| 324 | |
| 325 | big.clean_mem() |
| 326 | return big |
no test coverage detected