only collect fx node for user_visible_outputs when doing output stride conversion (#106194)
For yolo3, there has a subgraph that output has int value, and AttributeError: 'int' object has no attribute 'name` caused by collecting ser_visible_outputs to do output stride conversion. This PR will add a check only that the output is a fx node before being added in user_visible_outputs.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/106194
Approved by: https://github.com/jgong5, https://github.com/eellison, https://github.com/shunting314