Dreambooth-Stable-Diffusion
Dreambooth-Stable-Diffusion copied to clipboard
What transforms are used on the dataset images when training the model?
I tried to find them in the code, but it wasn't obvious which transforms were being used. I'd like to be able to modify the transforms as well.
Edit:
Looks like it used these transforms:
class FrozenClipImageEmbedder(nn.Module):
def preprocess(self, x):
# normalize to [0,1]
x = kornia.geometry.resize(x, (224, 224),
interpolation='bicubic',align_corners=True,
antialias=self.antialias)
x = (x + 1.) / 2.
# renormalize according to clip
x = kornia.enhance.normalize(x, self.mean, self.std)
return x
Source: https://github.com/JoePenna/Dreambooth-Stable-Diffusion/blob/main/ldm/modules/encoders/modules.py#L378