Stability-AI / stablediffusion

High-Resolution Image Synthesis with Latent Diffusion Models
MIT License
38.83k stars 5.01k forks source link

Optimize load_model_from_config function #255

Open AndresCdo opened 1 year ago

AndresCdo commented 1 year ago

Background:

The _load_model_fromconfig function in our codebase is responsible for loading a model from the given configuration and checkpoint. However, the current implementation can be optimized further for better readability and performance. In this pull request, we introduce some improvements to the function.

Changes Made: