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