code: def d_theta(
      self, x, sigma, encoder_hidden_states, guidance_scale=None
  ):
      eps_theta = self.predict_noise(
          x if guidance_scale is None else torch.cat([x] * 2),
          sigma,
          encoder_hidden_states,
      )
      # hacky bit: if guidance!=None, perform classifier free guidance
      # deviates from original implementation to support minimal code
      # duplication, even though it's not good practice
      if guidance_scale is not None:
          noise_pred_uncond, noise_pred_text = eps_theta.chunk(2)
          eps_theta = noise_pred_uncond + guidance_scale * (
              noise_pred_text - noise_pred_uncond
          )
  
      return self.c_skip(sigma) * x + self.c_out(sigma) * eps_theta
  
file_path: diffusion-for-beginners/samplers/heun.py
imports: import torch
  from math import sqrt
label_desc: Use image node_id 6 for calling the HeunSampler obj's underlying member method code with example usage: obj.d_theta(x, sigma, encoder_hidden_states, guidance_scale) and returns: unknown