How to set prior on var in brms

hi, i would like to run a Bayesian hierarchical model. my model is as follows,
y_i \sim Pois(\theta_i P_i) \\ log(\theta_i) \sim N(\mu,\sigma^2) \\ \mu \sim N(\mu_0, \tau^2) \\ \sigma^2 \sim Inv-Gamma(0.001,0.001)
my code is as follows,

model1 <- brm(
  formula = cases ~ 1 + (1 | state) + offset(log(P)),
  family = poisson(link = "log"),
  data = df,
  prior = 
    prior(normal(-7.87, 1), class = "Intercept") +
    prior(inv_gamma(0.001, 0.001), class = "var", group = "state")
)

it can’t wok. the error message is:
The following priors do not correspond to any model parameter:
var_state ~ inv_gamma(0.001, 0.001)
Function ‘default_prior’ might be helpful to you.

I know the code can work if class = “sd”. however, i would like to know the effect of conjugate prior on my model.

so, how to set this prior on var in brms?

Any reply is appreciated!

As you indicated, brms parameterizes in terms of \sigma, not \sigma^2. If you really want \sigma^2, I suspect you’d either have to use the non-linear syntax (see here) or perhaps define a custom distribution (see here).

Thank you for your reply. I gave up brms and use Stan.