diff --git a/pyro/distributions/mixture.py b/pyro/distributions/mixture.py
index 260c3b12..6eb8378c 100644
--- a/pyro/distributions/mixture.py
+++ b/pyro/distributions/mixture.py
@@ -48,12 +48,12 @@ class MaskedMixture(TorchDistribution):
         with pyro.plate("data", len(data)):
             pyro.sample("obs", MaskedMixture(mask, dist1, dist2), obs=data)
 
-    :param torch.Tensor mask: A byte tensor toggling between ``component0``
+    :param torch.Tensor mask: A boolean tensor toggling between ``component0``
         and ``component1``.
     :param pyro.distributions.TorchDistribution component0: a distribution
-        for batch elements ``mask == 0``.
+        for batch elements ``mask == False``.
     :param pyro.distributions.TorchDistribution component1: a distribution
-        for batch elements ``mask == 1``.
+        for batch elements ``mask == True``.
     """
     arg_constraints = {}  # nothing can be constrained
 
diff --git a/pyro/infer/mcmc/api.py b/pyro/infer/mcmc/api.py
index 6169073d..dfa55cf1 100644
--- a/pyro/infer/mcmc/api.py
+++ b/pyro/infer/mcmc/api.py
@@ -26,7 +26,7 @@ import pyro.poutine as poutine
 from pyro.infer.mcmc.hmc import HMC
 from pyro.infer.mcmc.logger import DIAGNOSTIC_MSG, ProgressBar, TqdmHandler, initialize_logger
 from pyro.infer.mcmc.nuts import NUTS
-from pyro.infer.mcmc.util import diagnostics, initialize_model, print_summary
+from pyro.infer.mcmc.util import diagnostics, print_summary
 from pyro.util import optional
 
 MAX_SEED = 2**32 - 1
@@ -408,19 +408,14 @@ class MCMC:
         # If transforms is not explicitly provided, infer automatically using
         # model args, kwargs.
         if self.transforms is None:
-            # Try to initialize kernel.transforms using kernel.setup().
-            if getattr(self.kernel, "transforms", None) is None:
-                warmup_steps = 0
-                self.kernel.setup(warmup_steps, *args, **kwargs)
             # Use `kernel.transforms` when available
             if getattr(self.kernel, "transforms", None) is not None:
                 self.transforms = self.kernel.transforms
             # Else, get transforms from model (e.g. in multiprocessing).
             elif self.kernel.model:
-                _, _, self.transforms, _ = initialize_model(self.kernel.model,
-                                                            model_args=args,
-                                                            model_kwargs=kwargs,
-                                                            initial_params={})
+                warmup_steps = 0
+                self.kernel.setup(warmup_steps, *args, **kwargs)
+                self.transforms = self.kernel.transforms
             # Assign default value
             else:
                 self.transforms = {}

[bug] MCMC with potential_fn gives error
### Issue Description

Since pyro v1.4.0, MCMC with a `potential_fn` fails if `transforms=None` (default value) is provided, see code snippet below. It worked fine for v1.3.1.

A work-around is explicitly passing `transforms={}`. However, I could not find a documentation of this API change. Is this intentional or a bug?

### Environment

macOS 10.13.6, python 3.8.2.
torch: 1.6.0
pyro: 1.4.0

### Code Snippet

```python
import torch
import pyro
from pyro.infer import HMC, MCMC

init_params = {"z": torch.tensor(0.)}

def potential_fn(params):
    return params["z"]

# Fails in v1.4.0, works in v.1.3.1
mcmc = MCMC(
    kernel=HMC(potential_fn=potential_fn),
    num_samples=10,
    warmup_steps=10,
    transforms=None,  # None is the default value
    initial_params=init_params)
mcmc.run()  # On v1.4.0 yields TypeError: 'NoneType' object is not subscriptable

# Work-around for v1.4.0
mcmc = MCMC(
    kernel=HMC(potential_fn=potential_fn),
    num_samples=10,
    warmup_steps=10,
    transforms={},
    initial_params=init_params)
mcmc.run()
```

### Analysis

From what I understand, after the chain was run, but **before** `transforms` are applied, `.cleanup` is called [here](https://github.com/pyro-ppl/pyro/blob/2dfa8da0dd400c3712768385d8306848e93dab9a/pyro/infer/mcmc/api.py#L171) which sets the `initial_params=None`.

Since v1.4.0, `self.kernel.setup()` will be called [here](https://github.com/pyro-ppl/pyro/blob/2dfa8da0dd400c3712768385d8306848e93dab9a/pyro/infer/mcmc/api.py#L414) if `self.kernel.transforms is None`. This will then throw an error due to `initial_params=None`. Until pyro v1.3.1, `self.transforms` had simply been set to `{}` if `self.kernels.transforms is None`.

diff --git a/tests/infer/mcmc/test_mcmc_api.py b/tests/infer/mcmc/test_mcmc_api.py
index 30ea24e9..a577da9d 100644
--- a/tests/infer/mcmc/test_mcmc_api.py
+++ b/tests/infer/mcmc/test_mcmc_api.py
@@ -230,3 +230,17 @@ def test_sequential_consistent(monkeypatch):
 
     assert_close(samples1["y"][0], samples2["y"][1])
     assert_close(samples1["y"][1], samples2["y"][0])
+
+
+def test_model_with_potential_fn():
+    init_params = {"z": torch.tensor(0.)}
+
+    def potential_fn(params):
+        return params["z"]
+
+    mcmc = MCMC(
+        kernel=HMC(potential_fn=potential_fn),
+        num_samples=10,
+        warmup_steps=10,
+        initial_params=init_params)
+    mcmc.run()

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist
apt-get update apt-get install -y gcc g++
3.7
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
aiofiles==22.1.0
aiosqlite==0.19.0
alabaster==0.7.13
anyio==3.7.1
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
arrow==1.2.3
attrs==24.2.0
Babel==2.14.0
backcall==0.2.0
beautifulsoup4==4.13.3
bleach==6.0.0
cached-property==1.5.2
certifi @ file:///croot/certifi_1671487769961/work/certifi
cffi==1.15.1
charset-normalizer==3.4.1
comm==0.1.4
coverage==7.2.7
cycler==0.11.0
debugpy==1.7.0
decorator==5.1.1
defusedxml==0.7.1
docutils==0.19
entrypoints==0.4
exceptiongroup==1.2.2
execnet==2.0.2
fastjsonschema==2.21.1
flake8==3.9.2
fonttools==4.38.0
fqdn==1.5.1
graphviz==0.20.1
idna==3.10
imagesize==1.4.1
importlib-metadata==6.7.0
importlib-resources==5.12.0
iniconfig==2.0.0
ipykernel==6.16.2
ipython==7.34.0
ipython-genutils==0.2.0
ipywidgets==8.1.5
isoduration==20.11.0
isort==5.11.5
jedi==0.19.2
Jinja2==3.1.6
joblib==1.3.2
json5==0.9.16
jsonpatch==1.33
jsonpointer==3.0.0
jsonschema==4.17.3
jupyter==1.1.1
jupyter-console==6.6.3
jupyter-events==0.6.3
jupyter-server==1.24.0
jupyter-ydoc==0.2.5
jupyter_client==7.4.9
jupyter_core==4.12.0
jupyter_server_fileid==0.9.3
jupyter_server_ydoc==0.8.0
jupyterlab==3.6.8
jupyterlab-pygments==0.2.2
jupyterlab_server==2.24.0
jupyterlab_widgets==3.0.13
kiwisolver==1.4.5
MarkupSafe==2.1.5
matplotlib==3.5.3
matplotlib-inline==0.1.6
mccabe==0.6.1
mistune==3.0.2
nbclassic==1.2.0
nbclient==0.7.4
nbconvert==7.6.0
nbformat==5.8.0
nbsphinx==0.9.7
nbstripout==0.6.2
nbval==0.11.0
nest-asyncio==1.6.0
networkx==2.6.3
ninja==1.11.1.4
notebook==6.5.7
notebook_shim==0.2.4
numpy==1.21.6
nvidia-cublas-cu11==11.10.3.66
nvidia-cuda-nvrtc-cu11==11.7.99
nvidia-cuda-runtime-cu11==11.7.99
nvidia-cudnn-cu11==8.5.0.96
opt-einsum==3.3.0
packaging==24.0
pandas==1.3.5
pandocfilters==1.5.1
parso==0.8.4
pexpect==4.9.0
pickleshare==0.7.5
Pillow==9.5.0
pkgutil_resolve_name==1.3.10
platformdirs==4.0.0
pluggy==1.2.0
prometheus-client==0.17.1
prompt_toolkit==3.0.48
psutil==7.0.0
ptyprocess==0.7.0
pycodestyle==2.7.0
pycparser==2.21
pyflakes==2.3.1
Pygments==2.17.2
pypandoc==1.15
pyparsing==3.1.4
pyro-api==0.1.2
-e git+https://github.com/pyro-ppl/pyro.git@99d99371f76179828f1924b7f973855fb2655fb2#egg=pyro_ppl
pyrsistent==0.19.3
pytest==7.4.4
pytest-cov==4.1.0
pytest-xdist==3.5.0
python-dateutil==2.9.0.post0
python-json-logger==3.0.1
pytz==2025.2
PyYAML==6.0.1
pyzmq==26.2.1
requests==2.31.0
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
scikit-learn==1.0.2
scipy==1.7.3
seaborn==0.12.2
Send2Trash==1.8.3
six==1.17.0
sniffio==1.3.1
snowballstemmer==2.2.0
soupsieve==2.4.1
Sphinx==5.3.0
sphinx-rtd-theme==2.0.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
terminado==0.17.1
threadpoolctl==3.1.0
tinycss2==1.2.1
tomli==2.0.1
torch==1.13.1
torchvision==0.14.1
tornado==6.2
tqdm==4.67.1
traitlets==5.9.0
typing_extensions==4.7.1
uri-template==1.3.0
urllib3==2.0.7
visdom==0.2.4
wcwidth==0.2.13
webcolors==1.13
webencodings==0.5.1
websocket-client==1.6.1
wget==3.2
widgetsnbextension==4.0.13
y-py==0.6.2
yapf==0.43.0
ypy-websocket==0.8.4
zipp==3.15.0

name: pyro
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - aiofiles==22.1.0
      - aiosqlite==0.19.0
      - alabaster==0.7.13
      - anyio==3.7.1
      - argon2-cffi==23.1.0
      - argon2-cffi-bindings==21.2.0
      - arrow==1.2.3
      - attrs==24.2.0
      - babel==2.14.0
      - backcall==0.2.0
      - beautifulsoup4==4.13.3
      - bleach==6.0.0
      - cached-property==1.5.2
      - cffi==1.15.1
      - charset-normalizer==3.4.1
      - comm==0.1.4
      - coverage==7.2.7
      - cycler==0.11.0
      - debugpy==1.7.0
      - decorator==5.1.1
      - defusedxml==0.7.1
      - docutils==0.19
      - entrypoints==0.4
      - exceptiongroup==1.2.2
      - execnet==2.0.2
      - fastjsonschema==2.21.1
      - flake8==3.9.2
      - fonttools==4.38.0
      - fqdn==1.5.1
      - graphviz==0.20.1
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==6.7.0
      - importlib-resources==5.12.0
      - iniconfig==2.0.0
      - ipykernel==6.16.2
      - ipython==7.34.0
      - ipython-genutils==0.2.0
      - ipywidgets==8.1.5
      - isoduration==20.11.0
      - isort==5.11.5
      - jedi==0.19.2
      - jinja2==3.1.6
      - joblib==1.3.2
      - json5==0.9.16
      - jsonpatch==1.33
      - jsonpointer==3.0.0
      - jsonschema==4.17.3
      - jupyter==1.1.1
      - jupyter-client==7.4.9
      - jupyter-console==6.6.3
      - jupyter-core==4.12.0
      - jupyter-events==0.6.3
      - jupyter-server==1.24.0
      - jupyter-server-fileid==0.9.3
      - jupyter-server-ydoc==0.8.0
      - jupyter-ydoc==0.2.5
      - jupyterlab==3.6.8
      - jupyterlab-pygments==0.2.2
      - jupyterlab-server==2.24.0
      - jupyterlab-widgets==3.0.13
      - kiwisolver==1.4.5
      - markupsafe==2.1.5
      - matplotlib==3.5.3
      - matplotlib-inline==0.1.6
      - mccabe==0.6.1
      - mistune==3.0.2
      - nbclassic==1.2.0
      - nbclient==0.7.4
      - nbconvert==7.6.0
      - nbformat==5.8.0
      - nbsphinx==0.9.7
      - nbstripout==0.6.2
      - nbval==0.11.0
      - nest-asyncio==1.6.0
      - networkx==2.6.3
      - ninja==1.11.1.4
      - notebook==6.5.7
      - notebook-shim==0.2.4
      - numpy==1.21.6
      - nvidia-cublas-cu11==11.10.3.66
      - nvidia-cuda-nvrtc-cu11==11.7.99
      - nvidia-cuda-runtime-cu11==11.7.99
      - nvidia-cudnn-cu11==8.5.0.96
      - opt-einsum==3.3.0
      - packaging==24.0
      - pandas==1.3.5
      - pandocfilters==1.5.1
      - parso==0.8.4
      - pexpect==4.9.0
      - pickleshare==0.7.5
      - pillow==9.5.0
      - pkgutil-resolve-name==1.3.10
      - platformdirs==4.0.0
      - pluggy==1.2.0
      - prometheus-client==0.17.1
      - prompt-toolkit==3.0.48
      - psutil==7.0.0
      - ptyprocess==0.7.0
      - pycodestyle==2.7.0
      - pycparser==2.21
      - pyflakes==2.3.1
      - pygments==2.17.2
      - pypandoc==1.15
      - pyparsing==3.1.4
      - pyro-api==0.1.2
      - pyrsistent==0.19.3
      - pytest==7.4.4
      - pytest-cov==4.1.0
      - pytest-xdist==3.5.0
      - python-dateutil==2.9.0.post0
      - python-json-logger==3.0.1
      - pytz==2025.2
      - pyyaml==6.0.1
      - pyzmq==26.2.1
      - requests==2.31.0
      - rfc3339-validator==0.1.4
      - rfc3986-validator==0.1.1
      - scikit-learn==1.0.2
      - scipy==1.7.3
      - seaborn==0.12.2
      - send2trash==1.8.3
      - six==1.17.0
      - sniffio==1.3.1
      - snowballstemmer==2.2.0
      - soupsieve==2.4.1
      - sphinx==5.3.0
      - sphinx-rtd-theme==2.0.0
      - sphinxcontrib-applehelp==1.0.2
      - sphinxcontrib-devhelp==1.0.2
      - sphinxcontrib-htmlhelp==2.0.0
      - sphinxcontrib-jquery==4.1
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.3
      - sphinxcontrib-serializinghtml==1.1.5
      - terminado==0.17.1
      - threadpoolctl==3.1.0
      - tinycss2==1.2.1
      - tomli==2.0.1
      - torch==1.13.1
      - torchvision==0.14.1
      - tornado==6.2
      - tqdm==4.67.1
      - traitlets==5.9.0
      - typing-extensions==4.7.1
      - uri-template==1.3.0
      - urllib3==2.0.7
      - visdom==0.2.4
      - wcwidth==0.2.13
      - webcolors==1.13
      - webencodings==0.5.1
      - websocket-client==1.6.1
      - wget==3.2
      - widgetsnbextension==4.0.13
      - y-py==0.6.2
      - yapf==0.43.0
      - ypy-websocket==0.8.4
      - zipp==3.15.0
prefix: /opt/conda/envs/pyro

tests/infer/mcmc/test_mcmc_api.py::test_model_with_potential_fn
tests/infer/mcmc/test_mcmc_api.py::test_mcmc_diagnostics[1] tests/infer/mcmc/test_mcmc_api.py::test_mcmc_diagnostics[2]
tests/infer/mcmc/test_mcmc_api.py::test_mcmc_interface[1-False-None] tests/infer/mcmc/test_mcmc_api.py::test_mcmc_interface[1-False-1800] tests/infer/mcmc/test_mcmc_api.py::test_mcmc_interface[1-False-2200] tests/infer/mcmc/test_mcmc_api.py::test_mcmc_interface[1-True-None] tests/infer/mcmc/test_mcmc_api.py::test_mcmc_interface[1-True-1800] tests/infer/mcmc/test_mcmc_api.py::test_mcmc_interface[1-True-2200] tests/infer/mcmc/test_mcmc_api.py::test_mcmc_interface[2-False-None] tests/infer/mcmc/test_mcmc_api.py::test_mcmc_interface[2-False-1800] tests/infer/mcmc/test_mcmc_api.py::test_mcmc_interface[2-False-2200] tests/infer/mcmc/test_mcmc_api.py::test_mcmc_interface[2-True-None] tests/infer/mcmc/test_mcmc_api.py::test_mcmc_interface[2-True-1800] tests/infer/mcmc/test_mcmc_api.py::test_mcmc_interface[2-True-2200] tests/infer/mcmc/test_mcmc_api.py::test_num_chains[True-1-2] tests/infer/mcmc/test_mcmc_api.py::test_num_chains[True-2-1] tests/infer/mcmc/test_mcmc_api.py::test_num_chains[True-2-2] tests/infer/mcmc/test_mcmc_api.py::test_num_chains[True-2-3] tests/infer/mcmc/test_mcmc_api.py::test_num_chains[False-1-2] tests/infer/mcmc/test_mcmc_api.py::test_num_chains[False-2-1] tests/infer/mcmc/test_mcmc_api.py::test_num_chains[False-2-2] tests/infer/mcmc/test_mcmc_api.py::test_num_chains[False-2-3] tests/infer/mcmc/test_mcmc_api.py::test_null_model_with_hook[1-False-HMC-_empty_model] tests/infer/mcmc/test_mcmc_api.py::test_null_model_with_hook[1-False-NUTS-_empty_model] tests/infer/mcmc/test_mcmc_api.py::test_null_model_with_hook[1-True-HMC-_empty_model] tests/infer/mcmc/test_mcmc_api.py::test_null_model_with_hook[1-True-NUTS-_empty_model] tests/infer/mcmc/test_mcmc_api.py::test_null_model_with_hook[2-False-HMC-_empty_model] tests/infer/mcmc/test_mcmc_api.py::test_null_model_with_hook[2-False-NUTS-_empty_model] tests/infer/mcmc/test_mcmc_api.py::test_null_model_with_hook[2-True-HMC-_empty_model] tests/infer/mcmc/test_mcmc_api.py::test_null_model_with_hook[2-True-NUTS-_empty_model] tests/infer/mcmc/test_mcmc_api.py::test_sequential_consistent
pyro/infer/mcmc/api.py pyro/distributions/mixture.py
pyro/infer/mcmc/api.py pyro/distributions/mixture.py