code: def apply_model(self, *args, **kwargs):
      if len(args) == 3:
          encoder_hidden_states = args[-1]
          args = args[:2]
      if kwargs.get("cond", None) is not None:
          encoder_hidden_states = kwargs.pop("cond")
      return self.model(
          *args, encoder_hidden_states=encoder_hidden_states, **kwargs
      ).sample
  
imports: import importlib
  import warnings
  from typing import Callable, List, Optional, Union
  import torch
  from k_diffusion.external import CompVisDenoiser, CompVisVDenoiser
  from diffusers import DiffusionPipeline, LMSDiscreteScheduler
  from diffusers.pipelines.stable_diffusion import StableDiffusionPipelineOutput
  from diffusers.utils import is_accelerate_available, logging
label_desc: Use image node_id 2 for calling the ModelWrapper obj's underlying member method code with example usage: obj.apply_model() and returns: self