Adding Models to Stable Diffusion Web UI in a Local Environment

This article can be read in about 5 minutes.
PR

The purpose 

Add a model to the Stable Diffusion web UI running locally.

PR

Environment

stable-diffusion-webui-amdgpu

PR

Download model

Download

You can download it from the following page.


You can download models by clicking the button on the right side of each model’s individual page.


(However, some models may require login.)

Civitai: The Home of Open-Source Generative AI
Explore thousands of high-quality Stable Diffusion & Flux models, share your AI-generated art, and engage with a vibrant community of creators

License

The license for each model is stated below the download button, within the red box, so please confirm it when using the model. (Many models appeared to have no restrictions on their use.)

Recommended Models

Nostalgia-clear

This is a model for generating anime-style images.

Nostalgia-clear - Nostalgia-clear | Stable Diffusion Checkpoint | Civitai
This is a clean version of Nostalgia-mix. good luck exam using best quality, detailed background, girl, ,euro_street, random_wear, Negative prompt:...

Real Dream

This is a model for generating realistic images.

Real Dream - SDXL Pony 17 | Stable Diffusion Checkpoint | Civitai
Note: In order for the model to be available in the generator, it needs to be in a good position in the CivitAi auction system every week. I need y...
PR

Install model

Download the file and copy it to the following folder.

INSTALL FOLDER\models\Stable-diffusion

Once the copy is complete, click the button at the bottom of the GUI.

When the process is complete, the downloaded model will be selectable from the pull-down menu to the left of the button.

PR

When the switch fails

Switching is not finishing.

When the switch doesn’t work well (or is slow), clicking the refresh button again can sometimes resolve it.

Failed to create model quickly; will retry using slow method.


If the following error appears during switching or startup, causing a delay, it can sometimes be resolved by modifying the code:

You’ll be modifying the script. Please proceed at your own risk.

Failed to create model quickly; will retry using slow method.

Open the following file:

INSTALL FOLDER¥modules¥sd_disable_initialization.py

Look for the following code:

        def CLIPTextModel_from_pretrained(pretrained_model_name_or_path, *model_args, **kwargs):
            res = self.CLIPTextModel_from_pretrained(None, *model_args, config=pretrained_model_name_or_path, state_dict={}, **kwargs)
            res.name_or_path = pretrained_model_name_or_path
            return res

Replace the code above with the following: (You’re replacing None with pretrained_model_name_or_path.)

        def CLIPTextModel_from_pretrained(pretrained_model_name_or_path, *model_args, **kwargs):
            res = self.CLIPTextModel_from_pretrained(pretrained_model_name_or_path, *model_args, config=pretrained_model_name_or_path, state_dict={}, **kwargs)
            res.name_or_path = pretrained_model_name_or_path
            return res
PR

Reffernece

[Bug]: impossible to change models · Issue #13245 · AUTOMATIC1111/stable-diffusion-webui
Is there an existing issue for this? I have searched the existing issues and checked the recent builds/commits What happened? A lot of errors on startup. Imposs...

comment

Copied title and URL