Skip to content

Normalization twice in Clipper  #10

@lzy00codeforfun

Description

@lzy00codeforfun

Hi,

Here in the Clipper, before encoding the image, the code seems normalize the latent twice. Is this correct?

def embed_image(self, image): ` 
        """Expects images in -1 to 1 range""" 
        clip_in = F.interpolate(image, self.clip_size, mode="area")
        clip_in = self.normalize(0.5*clip_in + 0.5).clamp(0,1)
        return self.clip.encode_image(self.normalize(clip_in))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions