  Photometric surveys with the Hubble Space Telescope (HST) allow us to study
stellar populations with high resolution and deep coverage, with estimates of
the physical parameters of the constituent stars being typically obtained by
comparing the survey data with adequate stellar evolutionary models. This is a
highly non-trivial task due to effects such as differential extinction,
photometric errors, low filter coverage, or uncertainties in the stellar
evolution calculations. These introduce degeneracies that are difficult to
detect and break. To improve this situation, we introduce a novel deep learning
approach, called conditional invertible neural network (cINN), to solve the
inverse problem of predicting physical parameters from photometry on an
individual star basis and to obtain the full posterior distributions. We build
a carefully curated synthetic training data set derived from the PARSEC stellar
evolution models to predict stellar age, initial/current mass, luminosity,
effective temperature and surface gravity. We perform tests on synthetic data
from the MIST and Dartmouth models, and benchmark our approach on HST data of
two well-studied stellar clusters, Westerlund 2 and NGC 6397. For the synthetic
data we find overall excellent performance, and note that age is the most
difficult parameter to constrain. For the benchmark clusters we retrieve
reasonable results and confirm previous findings for Westerlund 2 on cluster
age ($1.04_{-0.90}^{+8.48}\,\mathrm{Myr} $), mass segregation, and the stellar
initial mass function. For NGC 6397 we recover plausible estimates for masses,
luminosities and temperatures, however, discrepancies between stellar evolution
models and observations prevent an acceptable recovery of age for old stars.
