stable-diffusion-webui
34 строки · 1.1 Кб
1from ldm.models.diffusion.ddpm import LatentDiffusion2from typing import TYPE_CHECKING3
4
5if TYPE_CHECKING:6from modules.sd_models import CheckpointInfo7
8
9class WebuiSdModel(LatentDiffusion):10"""This class is not actually instantinated, but its fields are created and fieeld by webui"""11
12lowvram: bool13"""True if lowvram/medvram optimizations are enabled -- see modules.lowvram for more info"""14
15sd_model_hash: str16"""short hash, 10 first characters of SHA1 hash of the model file; may be None if --no-hashing flag is used"""17
18sd_model_checkpoint: str19"""path to the file on disk that model weights were obtained from"""20
21sd_checkpoint_info: 'CheckpointInfo'22"""structure with additional information about the file with model's weights"""23
24is_sdxl: bool25"""True if the model's architecture is SDXL or SSD"""26
27is_ssd: bool28"""True if the model is SSD"""29
30is_sd2: bool31"""True if the model's architecture is SD 2.x"""32
33is_sd1: bool34"""True if the model's architecture is SD 1.x"""35