model.add_module(new_module) adds the new module to the model’s list of modules. model.new_module = new_module also adds the module to the model’s list of modules.
If a module is not in the model’s list of modules then model.parameters() and model.state_dict() will skip over that module. Given that you manually add the module’s parameters to the optimiser it probably doesn’t matter that model.parameters() skips that module. But if you want to save the model using model.state_dict() then you don’t want to skip any modules.