Add a model to the Stable Diffusion web UI in your local environment.

この記事は約5分で読めます。
スポンサーリンク

Things I want to do

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

スポンサーリンク

環境

stable-diffusion-webui-amdgpu

スポンサーリンク

Download the model

download

You can download it from the following page.

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

(However, some models 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 listed in the red box below the download button, so please check it before using. (Many models appeared to have no restrictions on 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 images that look like real life.

Real Dream - Z-Image V1 | ZImageTurbo Checkpoint | Civitai
Real Dream Website (Faster download) Patreon Available at TensorArt: Workflows: Z-image-turbo img2img...
スポンサーリンク

Model Installation

Copy the downloaded file to the following folder.

インストールフォルダ\models\Stable-diffusion

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

Once the process is complete, you will be able to select the downloaded model from the dropdown menu to the left of the button.

スポンサーリンク

When the transition doesn’t go well

The switchover is not finished.

If the switch doesn’t work properly (or is slow), clicking the refresh button again may resolve the issue.

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

If you encounter the following error during switching or startup, and the system is slow, this can sometimes be resolved by modifying the code.

I will modify the script.

Proceed at your own risk.

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

Open the following file.

インストールフォルダ¥modules¥sd_disable_initialization.py

Find 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 above code with the following: (Replace 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
スポンサーリンク

Websites I used as references

[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...

コメント

タイトルとURLをコピーしました