class_docstr: Image to Image pipeline using any `AutoModelForImageToImage`. This pipeline generates an image based on a previous
  image input.
  
  Example:
  
  ```python
  >>> from PIL import Image
  >>> import requests
  
  >>> from transformers import pipeline
  
  >>> upscaler = pipeline("image-to-image", model="caidas/swin2SR-classical-sr-x2-64")
  >>> img = Image.open(requests.get("http://images.cocodataset.org/val2017/000000039769.jpg", stream=True).raw)
  >>> img = img.resize((64, 64))
  >>> upscaled_img = upscaler(img)
  >>> img.size
  (64, 64)
  
  >>> upscaled_img.size
  (144, 144)
  ```
  
  This image to image pipeline can currently be loaded from [`pipeline`] using the following task identifier:
  `"image-to-image"`.
  
  See the list of available models on [huggingface.co/models](https://huggingface.co/models?filter=image-to-image).
code: def _sanitize_parameters(self, **kwargs):
      preprocess_params = {}
      postprocess_params = {}
      forward_params = {}
  
      if "timeout" in kwargs:
          preprocess_params["timeout"] = kwargs["timeout"]
      if "head_mask" in kwargs:
          forward_params["head_mask"] = kwargs["head_mask"]
  
      return preprocess_params, forward_params, postprocess_params
  
file_path: transformers/src/transformers/pipelines/image_to_image.py
imports: from typing import List, Union
  import numpy
  from ..utils import add_end_docstrings, is_torch_available, is_vision_available, logging, requires_backends
  from .base import PIPELINE_INIT_ARGS, Pipeline
label_desc: Use image node_id 2 for calling the ImageToImagePipeline obj's underlying member method code with example usage: obj._sanitize_parameters() and returns: preprocess_params,  forward_params,  postprocess_params