  With a graph $G=(V,E)$ we associate a collection of non-negative real weights
$\cup_{v\in V}{\lambda_{i,v}:1\leq i \leq m} \cup \cup_{uv \in E}
{\lambda_{ij,uv}:1\leq i \leq j \leq m}$. We consider the probability
distribution on ${f:V\rightarrow{1,...,m}}$ in which each $f$ occurs with
probability proportional to $\prod_{v \in V}\lambda_{f(v),v}\prod_{uv \in
E}\lambda_{f(u)f(v),uv}$. Many well-known statistical physics models, including
the Ising model with an external field and the hard-core model with non-uniform
activities, can be framed as such a distribution. We obtain an upper bound,
independent of $G$, for the partition function (the normalizing constant which
turns the assignment of weights on $\{f:V\rightarrow{1,...,m\}}$ into a
probability distribution) in the case when $G$ is a regular bipartite graph.
This generalizes a bound obtained by Galvin and Tetali who considered the
simpler weight collection $\{\lambda_i:1 \leq i \leq m\} \cup \{\lambda_{ij}:1
\leq i \leq j \leq m\}$ with each $\lambda_{ij}$ either 0 or 1 and with each
$f$ chosen with probability proportional to $\prod_{v \in
V}\lambda_{f(v)}\prod_{uv \in E}\lambda_{f(u)f(v)}$. Our main tools are a
generalization to list homomorphisms of a result of Galvin and Tetali on graph
homomorphisms and a straightforward second-moment computation.
