class_docstr: Base class for all Flax models.
  
  [`FlaxModelMixin`] takes care of storing the model configuration and provides methods for loading, downloading and
  saving models.
  
      - **config_name** ([`str`]) -- Filename to save a model to when calling [`~FlaxModelMixin.save_pretrained`].
docstr: Cast the floating-point `params` to `jax.numpy.float32`. This method can be used to explicitly convert the
  model parameters to fp32 precision. This returns a new `params` tree and does not cast the `params` in place.
  
  Arguments:
      params (`Union[Dict, FrozenDict]`):
          A `PyTree` of model parameters.
      mask (`Union[Dict, FrozenDict]`):
          A `PyTree` with same structure as the `params` tree. The leaves should be booleans. It should be `True`
          for params you want to cast, and `False` for those you want to skip.
  
  Examples:
  
  ```python
  >>> from diffusers import FlaxUNet2DConditionModel
  
  >>> # Download model and configuration from huggingface.co
  >>> model, params = FlaxUNet2DConditionModel.from_pretrained("runwayml/stable-diffusion-v1-5")
  >>> # By default, the model params will be in fp32, to illustrate the use of this method,
  >>> # we'll first cast to fp16 and back to fp32
  >>> params = model.to_f16(params)
  >>> # now cast back to fp32
  >>> params = model.to_fp32(params)
  ```
docstr_tok: ["Cast","the","floating-point","`","params","`","to","`","jax.numpy.float32","`",".","This","method","can","be","used","to","explicitly","convert","the","model","parameters","to","fp32","precision",".","This","returns","a","new","`","params","`","tree","and","does","not","cast","the","`","params","`","in","place",".","Arguments",":","params","(","`","Union","[","Dict",",","FrozenDict","]","`",")",":","A","`","PyTree","`","of","model","parameters",".","mask","(","`","Union","[","Dict",",","FrozenDict","]","`",")",":","A","`","PyTree","`","with","same","structure","as","the","`","params","`","tree",".","The","leaves","should","be","booleans",".","It","should","be","`","True","`","for","params","you","want","to","cast",",","and","`","False","`","for","those","you","want","to","skip",".","Examples",":","``","`","python",">",">",">","from","diffusers","import","FlaxUNet2DConditionModel",">",">",">","#","Download","model","and","configuration","from","huggingface.co",">",">",">","model",",","params","=","FlaxUNet2DConditionModel.from_pretrained","(","``","runwayml\/stable-diffusion-v1-5","''",")",">",">",">","#","By","default",",","the","model","params","will","be","in","fp32",",","to","illustrate","the","use","of","this","method",",",">",">",">","#","we","'ll","first","cast","to","fp16","and","back","to","fp32",">",">",">","params","=","model.to_f16","(","params",")",">",">",">","#","now","cast","back","to","fp32",">",">",">","params","=","model.to_fp32","(","params",")","``","`"]
code: def to_fp32(self, params: Union[Dict, FrozenDict], mask: Any = None):
      r"""
      Cast the floating-point `params` to `jax.numpy.float32`. This method can be used to explicitly convert the
      model parameters to fp32 precision. This returns a new `params` tree and does not cast the `params` in place.
  
      Arguments:
          params (`Union[Dict, FrozenDict]`):
              A `PyTree` of model parameters.
          mask (`Union[Dict, FrozenDict]`):
              A `PyTree` with same structure as the `params` tree. The leaves should be booleans. It should be `True`
              for params you want to cast, and `False` for those you want to skip.
  
      Examples:
  
      ```python
      >>> from diffusers import FlaxUNet2DConditionModel
  
      >>> # Download model and configuration from huggingface.co
      >>> model, params = FlaxUNet2DConditionModel.from_pretrained("runwayml/stable-diffusion-v1-5")
      >>> # By default, the model params will be in fp32, to illustrate the use of this method,
      >>> # we'll first cast to fp16 and back to fp32
      >>> params = model.to_f16(params)
      >>> # now cast back to fp32
      >>> params = model.to_fp32(params)
      ```"""
      return self._cast_floating_to(params, jnp.float32, mask)
  
imports: import os
  from pickle import UnpicklingError
  from typing import Any, Dict, Union
  import jax
  import jax.numpy
  import msgpack.exceptions
  from flax.core.frozen_dict import FrozenDict, unfreeze
  from flax.serialization import from_bytes, to_bytes
  from flax.traverse_util import flatten_dict, unflatten_dict
  from huggingface_hub import create_repo, hf_hub_download
  from huggingface_hub.utils import EntryNotFoundError, RepositoryNotFoundError, RevisionNotFoundError
  from requests import HTTPError
  from ..None import __version__, is_torch_available
  from ..utils import CONFIG_NAME, DIFFUSERS_CACHE, FLAX_WEIGHTS_NAME, HUGGINGFACE_CO_RESOLVE_ENDPOINT, WEIGHTS_NAME, PushToHubMixin, logging
  from .modeling_flax_pytorch_utils import convert_pytorch_state_dict_to_flax
label_desc: Use image node_id 4 for calling the FlaxModelMixin obj's underlying member method code with example usage: obj.to_fp32(params, mask) and returns: self