Vendored pack classes are not nn.Modules; the dtype cast crashed on named_modules. Walk their Module attributes, and delegate into each child's own tree (_modules is invisible to __dict__ iteration).