code: def __init__(self, config, proj_size=None):
      super().__init__(config)
      self.proj_size = proj_size or getattr(
          config, "projection_dim", 768
      )
  
      self.model = CLIPVisionModel(config)
      self.mapper = PaintByExampleMapper(config)
      self.final_layer_norm = nn.LayerNorm(config.hidden_size)
      self.proj_out = nn.Linear(config.hidden_size, self.proj_size)
  
      # uncondition for scaling
      self.uncond_vector = nn.Parameter(
          torch.randn((1, 1, self.proj_size))
      )
  
file_path: diffusers/src/diffusers/pipelines/paint_by_example/image_encoder.py
imports: import torch
  from torch import nn
  from transformers import CLIPPreTrainedModel, CLIPVisionModel
  from ...models.attention import BasicTransformerBlock
  from ...utils import logging
label_desc: Use image node_id 1 to create a new PaintByExampleImageEncoder object from inherited base classes: CLIPPreTrainedModel with example: obj = PaintByExampleImageEncoder(config, proj_size)