Hi
Thank you so much for your reply and your help,
Answer 1:
I am using my own reconstruction loss calculation because I was unsure how to correctly incorporate weighted inverse variance. which is what ivar is. They are also all detached because I did not know how to perform the MSE*IVAR calculation in the tensor form.  How would I perform that calculation without detaching the gradients?
Answer 2:
fl is flux which is my input data and fl_sample is the reconstruction from the VAE.
(I think you are correct, issues are from things not being tensors, but still unsure how to do what I want with them staying as tensors. )
Thank you!