Modification of diffusion_model_unet to allow for SPADE normalisation to be set up as an option
Modification of autoencoder_kl to allow for SPADE normalisation to be set up as an option
Modification of inferer and latent inferer to allow for label to be passed through forward when SPADE is active
Addition of tests to: test_spade_diffusion
Creation of tutorial for 2D using OASIS subset of images.
Even though I implemented tests, we should check very thoroughly that this works before merging, especially since the presence of SPADE norm needs for labels to be passed to the forward method, and ANY call of forward without a label if SPADE Is on will end up in error. In the same fashion, we should ensure that ANY call on forward when SPADE is not on is not disrupted (code doesn't error out because of a label missing).
I removed all the changes from autoencoderkl and diffusion_model_unet and created separate spade_autoencoderkl and spade_diffusion_model_unet scripts. The logic now is that, obviously, objects from these classes have SPADE and you need to pass label_nc argument.
Based on that, I modified the inferer.py to accept optional seg, checking if any (AE or DM) are instances of SPADEAutoencoderKL or SPADEDiffusionModelUNet
I changed the tests for the inferer to add SPADE cases
I added tests for spade_autoencoderkl and spade_diffusion_model_unet
I modified the tutorial to incorporate this name changes.
Added SPADE-LDM code:
Even though I implemented tests, we should check very thoroughly that this works before merging, especially since the presence of SPADE norm needs for labels to be passed to the forward method, and ANY call of forward without a label if SPADE Is on will end up in error. In the same fashion, we should ensure that ANY call on forward when SPADE is not on is not disrupted (code doesn't error out because of a label missing).