class_docstr: Uses the OpenCLIP vision transformer encoder for images
class_docstr_tok: ["Uses","the","OpenCLIP","vision","transformer","encoder","for","images"]
code: 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.0) / 2.0
      # renormalize according to clip
      x = kornia.enhance.normalize(x, self.mean, self.std)
      return x
  
imports: import torch
  import torch.nn
  import kornia
  from torch.utils.checkpoint import checkpoint
  from transformers import T5Tokenizer, T5EncoderModel, CLIPTokenizer, CLIPTextModel
  import open_clip
  from ldm.util import default, count_params, autocast
  from ldm.modules.diffusionmodules.upscaling import ImageConcatWithNoiseAugmentation
  from ldm.modules.diffusionmodules.openaimodel import Timestep
label_desc: Use image node_id 2 for calling the FrozenOpenCLIPImageEmbedder obj's underlying member method code with example usage: obj.preprocess(x) and returns: x