MCPcopy Create free account
hub / github.com/OpenImagingLab/FlashVSR / build_tcdecoder

Function build_tcdecoder

examples/WanVSR/utils/TCDecoder.py:303–320  ·  view source on GitHub ↗

构建“更宽”的 decoder;深度增强(IdentityConv2d+ReLU)已在 TAEHV 内部完成。 - 不创建 small / 不做移植 - base_ckpt_path 参数保留但不使用(接口兼容) 返回:big (单个模型)

(new_channels = [512, 256, 128, 128],
                                  device="cuda",
                                  dtype=torch.bfloat16,
                                  new_latent_channels=None)

Source from the content-addressed store, hash-verified

301# ----------------------------
302
303def 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

Callers 4

init_pipelineFunction · 0.90
init_pipelineFunction · 0.90
init_pipelineFunction · 0.90
init_pipelineFunction · 0.90

Calls 3

TAEHVClass · 0.85
toMethod · 0.45
clean_memMethod · 0.45

Tested by

no test coverage detected