class_docstr: Exponential Moving Average of models weights
class_docstr_tok: ["Exponential","Moving","Average","of","models","weights"]
docstr: Move internal buffers of the ExponentialMovingAverage to `device`.
  
  Args:
      device: like `device` argument to `torch.Tensor.to`
docstr_tok: ["Move","internal","buffers","of","the","ExponentialMovingAverage","to","`","device","`",".","Args",":","device",":","like","`","device","`","argument","to","`","torch.Tensor.to","`"]
code: def to(self, device=None, dtype=None) -> None:
      r"""Move internal buffers of the ExponentialMovingAverage to `device`.
  
      Args:
          device: like `device` argument to `torch.Tensor.to`
      """
      # .to() on the tensors handles None correctly
      self.shadow_params = [
          p.to(device=device, dtype=dtype)
          if p.is_floating_point()
          else p.to(device=device)
          for p in self.shadow_params
      ]
  
imports: import contextlib
  import copy
  import random
  from typing import Any, Dict, Iterable, List, Optional, Union
  import numpy
  import torch
  from torchvision import transforms
  from .models import UNet2DConditionModel
  from .utils import convert_state_dict_to_diffusers, convert_state_dict_to_peft, deprecate, is_peft_available, is_transformers_available
label_desc: Use image node_id 7 for calling the EMAModel obj's underlying member method code with example usage: obj.to(device, dtype) without return types