class_docstr: The full UNet model with attention and timestep embedding.
  :param in_channels: channels in the input Tensor.
  :param model_channels: base channel count for the model.
  :param out_channels: channels in the output Tensor.
  :param num_res_blocks: number of residual blocks per downsample.
  :param attention_resolutions: a collection of downsample rates at which
      attention will take place. May be a set, list, or tuple.
      For example, if this contains 4, then at 4x downsampling, attention
      will be used.
  :param dropout: the dropout probability.
  :param channel_mult: channel multiplier for each level of the UNet.
  :param conv_resample: if True, use learned convolutions for upsampling and
      downsampling.
  :param dims: determines if the signal is 1D, 2D, or 3D.
  :param num_classes: if specified (as an int), then this model will be
      class-conditional with `num_classes` classes.
  :param use_checkpoint: use gradient checkpointing to reduce memory usage.
  :param num_heads: the number of attention heads in each attention layer.
  :param num_heads_channels: if specified, ignore num_heads and instead use
                             a fixed channel width per attention head.
  :param num_heads_upsample: works with num_heads to set a different number
                             of heads for upsampling. Deprecated.
  :param use_scale_shift_norm: use a FiLM-like conditioning mechanism.
  :param resblock_updown: use residual blocks for up/downsampling.
  :param use_new_attention_order: use a different attention pattern for potentially
                                  increased efficiency.
class_docstr_tok: ["The","full","UNet","model","with","attention","and","timestep","embedding",".",":","param","in_channels",":","channels","in","the","input","Tensor",".",":","param","model_channels",":","base","channel","count","for","the","model",".",":","param","out_channels",":","channels","in","the","output","Tensor",".",":","param","num_res_blocks",":","number","of","residual","blocks","per","downsample",".",":","param","attention_resolutions",":","a","collection","of","downsample","rates","at","which","attention","will","take","place",".","May","be","a","set",",","list",",","or","tuple",".","For","example",",","if","this","contains","4",",","then","at","4x","downsampling",",","attention","will","be","used",".",":","param","dropout",":","the","dropout","probability",".",":","param","channel_mult",":","channel","multiplier","for","each","level","of","the","UNet",".",":","param","conv_resample",":","if","True",",","use","learned","convolutions","for","upsampling","and","downsampling",".",":","param","dims",":","determines","if","the","signal","is","1D",",","2D",",","or","3D",".",":","param","num_classes",":","if","specified","(","as","an","int",")",",","then","this","model","will","be","class-conditional","with","`","num_classes","`","classes",".",":","param","use_checkpoint",":","use","gradient","checkpointing","to","reduce","memory","usage",".",":","param","num_heads",":","the","number","of","attention","heads","in","each","attention","layer",".",":","param","num_heads_channels",":","if","specified",",","ignore","num_heads","and","instead","use","a","fixed","channel","width","per","attention","head",".",":","param","num_heads_upsample",":","works","with","num_heads","to","set","a","different","number","of","heads","for","upsampling",".","Deprecated",".",":","param","use_scale_shift_norm",":","use","a","FiLM-like","conditioning","mechanism",".",":","param","resblock_updown",":","use","residual","blocks","for","up\/downsampling",".",":","param","use_new_attention_order",":","use","a","different","attention","pattern","for","potentially","increased","efficiency","."]
docstr: Convert the torso of the model to float32.
docstr_tok: ["Convert","the","torso","of","the","model","to","float32","."]
code: def convert_to_fp32(self):
      """
      Convert the torso of the model to float32.
      """
      self.input_blocks.apply(convert_module_to_f32)
      self.middle_block.apply(convert_module_to_f32)
      self.output_blocks.apply(convert_module_to_f32)
  
imports: from abc import abstractmethod
  from functools import partial
  import math
  from typing import Iterable
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from ldm.modules.diffusionmodules.util import checkpoint, conv_nd, linear, avg_pool_nd, zero_module, normalization, timestep_embedding
  from ldm.modules.attention import SpatialTransformer
label_desc: Use image node_id 3 for calling the UNetModel obj's underlying member method code with example usage: obj.convert_to_fp32() without return types