Solved by iseeyuan in post #6 
              
              
                It should have been resolved by @cccclai in [After fix] Reuse constant and bump bytecode to v5 by cccclai · Pull Request #59722 · pytorch/pytorch · GitHub