CriticModel doesn't use the trunk/block registries or the StageModel base #57
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
CriticModel(giant/model/models.py) is the one stage-shaped class left out of two refactors:self.blocks = nn.ModuleList([ResBlock(...) for _ in range(n_res_blocks)])— instead of going throughbuild_trunk/TRUNK_REGISTRY(gitea #33), so a routed/transformer/FiLM-conditioned trunk is available to every generative stage model except the critic that's supposed to compete against them under WGAN-GP.ResBlock(additive conditioning) directly rather thanbuild_block/BLOCK_REGISTRY(gitea #34), sotrunk.block_conditioning = "film" | "adaln"has no effect on the critic side of a WGAN pair.StageModelbase added in #39: it duplicatescond_encconstruction and (forstage="stage2") the samecontext_adapter+fusepattern asStage2OneShot/Stage2Autoregressive's_cond_embed, by hand.This was deliberately left out of #39 rather than folded in, since
CriticModelwould need reshaping to a registry-trunk body first — itsforwardtakes a rawx/stage1_outpair and returns a scalar, not the(x_t, cond, cond_cont, cond_cat) -> vectorshapeTrunkimplementations expect, so it isn't a drop-in_build_trunk_and_headscaller today.Proposal: give
CriticModelan output-width-1 trunk viabuild_trunk/build_block(probably wants aTrunkConfig-shapedstage{1,2}_model.wgan.critic_trunkor reuse of the generator's owntrunk/block_conditioningconfig, tbd), and subclassStageModelfor thecond_enc/context-fusion half — its stage2context_adapter+fusepair is already identical toStage2OneShot's. Config-key naming and back-compat for existing WGAN checkpoints need deciding before implementation, per this tracker's usual process.Related: #33 (trunk registry), #34 (block-conditioning registry), #39 (StageModel base, this issue's sibling for the three generator-side stage classes).