No, the credits will be automatically refunded to your account. To view your refunded credits, please visit the App Usage History section, which can be found under Settings - Subscription page.
However, if by "fail" you mean that the model was generated successfully but did not meet your expectations, credits will not be refunded in such cases. We are continuously striving to improve the quality of our models to reduce such occurrences, with the ultimate goal of eliminating them entirely.