mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Update t5 encoder formats to accurately reflect the quantization strategy and data type
This commit is contained in:
parent
3339a4baf0
commit
101de8c25d
@ -109,8 +109,7 @@ class ModelFormat(str, Enum):
|
|||||||
EmbeddingFolder = "embedding_folder"
|
EmbeddingFolder = "embedding_folder"
|
||||||
InvokeAI = "invokeai"
|
InvokeAI = "invokeai"
|
||||||
T5Encoder = "t5_encoder"
|
T5Encoder = "t5_encoder"
|
||||||
T5Encoder8b = "t5_encoder_8b"
|
BnbQuantizedLlmInt8b = "bnb_quantized_int8b"
|
||||||
T5Encoder4b = "t5_encoder_4b"
|
|
||||||
BnbQuantizednf4b = "bnb_quantized_nf4b"
|
BnbQuantizednf4b = "bnb_quantized_nf4b"
|
||||||
|
|
||||||
|
|
||||||
@ -227,12 +226,12 @@ class T5EncoderConfig(T5EncoderConfigBase):
|
|||||||
return Tag(f"{ModelType.T5Encoder.value}.{ModelFormat.T5Encoder.value}")
|
return Tag(f"{ModelType.T5Encoder.value}.{ModelFormat.T5Encoder.value}")
|
||||||
|
|
||||||
|
|
||||||
class T5Encoder8bConfig(T5EncoderConfigBase):
|
class T5EncoderBnbQuantizedLlmInt8bConfig(T5EncoderConfigBase):
|
||||||
format: Literal[ModelFormat.T5Encoder8b] = ModelFormat.T5Encoder8b
|
format: Literal[ModelFormat.BnbQuantizedLlmInt8b] = ModelFormat.BnbQuantizedLlmInt8b
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_tag() -> Tag:
|
def get_tag() -> Tag:
|
||||||
return Tag(f"{ModelType.T5Encoder.value}.{ModelFormat.T5Encoder8b.value}")
|
return Tag(f"{ModelType.T5Encoder.value}.{ModelFormat.BnbQuantizedLlmInt8b.value}")
|
||||||
|
|
||||||
|
|
||||||
class LoRALyCORISConfig(LoRAConfigBase):
|
class LoRALyCORISConfig(LoRAConfigBase):
|
||||||
@ -470,7 +469,7 @@ AnyModelConfig = Annotated[
|
|||||||
Annotated[LoRALyCORISConfig, LoRALyCORISConfig.get_tag()],
|
Annotated[LoRALyCORISConfig, LoRALyCORISConfig.get_tag()],
|
||||||
Annotated[LoRADiffusersConfig, LoRADiffusersConfig.get_tag()],
|
Annotated[LoRADiffusersConfig, LoRADiffusersConfig.get_tag()],
|
||||||
Annotated[T5EncoderConfig, T5EncoderConfig.get_tag()],
|
Annotated[T5EncoderConfig, T5EncoderConfig.get_tag()],
|
||||||
Annotated[T5Encoder8bConfig, T5Encoder8bConfig.get_tag()],
|
Annotated[T5EncoderBnbQuantizedLlmInt8bConfig, T5EncoderBnbQuantizedLlmInt8bConfig.get_tag()],
|
||||||
Annotated[TextualInversionFileConfig, TextualInversionFileConfig.get_tag()],
|
Annotated[TextualInversionFileConfig, TextualInversionFileConfig.get_tag()],
|
||||||
Annotated[TextualInversionFolderConfig, TextualInversionFolderConfig.get_tag()],
|
Annotated[TextualInversionFolderConfig, TextualInversionFolderConfig.get_tag()],
|
||||||
Annotated[IPAdapterInvokeAIConfig, IPAdapterInvokeAIConfig.get_tag()],
|
Annotated[IPAdapterInvokeAIConfig, IPAdapterInvokeAIConfig.get_tag()],
|
||||||
|
@ -27,22 +27,21 @@ from invokeai.backend.model_manager.config import (
|
|||||||
CLIPEmbedDiffusersConfig,
|
CLIPEmbedDiffusersConfig,
|
||||||
MainBnbQuantized4bCheckpointConfig,
|
MainBnbQuantized4bCheckpointConfig,
|
||||||
MainCheckpointConfig,
|
MainCheckpointConfig,
|
||||||
T5Encoder8bConfig,
|
T5EncoderBnbQuantizedLlmInt8bConfig,
|
||||||
T5EncoderConfig,
|
T5EncoderConfig,
|
||||||
VAECheckpointConfig,
|
VAECheckpointConfig,
|
||||||
)
|
)
|
||||||
from invokeai.backend.model_manager.load.load_default import ModelLoader
|
from invokeai.backend.model_manager.load.load_default import ModelLoader
|
||||||
from invokeai.backend.model_manager.load.model_loader_registry import ModelLoaderRegistry
|
from invokeai.backend.model_manager.load.model_loader_registry import ModelLoaderRegistry
|
||||||
from invokeai.backend.quantization.bnb_llm_int8 import quantize_model_llm_int8
|
|
||||||
from invokeai.backend.quantization.bnb_nf4 import quantize_model_nf4
|
|
||||||
from invokeai.backend.util.silence_warnings import SilenceWarnings
|
from invokeai.backend.util.silence_warnings import SilenceWarnings
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
from invokeai.backend.quantization.bnb_llm_int8 import quantize_model_llm_int8
|
||||||
from invokeai.backend.quantization.bnb_nf4 import quantize_model_nf4
|
from invokeai.backend.quantization.bnb_nf4 import quantize_model_nf4
|
||||||
|
|
||||||
bnb_nf4_available = True
|
bnb_available = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
bnb_nf4_available = False
|
bnb_available = False
|
||||||
|
|
||||||
app_config = get_config()
|
app_config = get_config()
|
||||||
|
|
||||||
@ -100,8 +99,8 @@ class ClipCheckpointModel(ModelLoader):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ModelLoaderRegistry.register(base=BaseModelType.Any, type=ModelType.T5Encoder, format=ModelFormat.T5Encoder8b)
|
@ModelLoaderRegistry.register(base=BaseModelType.Any, type=ModelType.T5Encoder, format=ModelFormat.BnbQuantizedLlmInt8b)
|
||||||
class T5Encoder8bCheckpointModel(ModelLoader):
|
class BnbQuantizedLlmInt8bCheckpointModel(ModelLoader):
|
||||||
"""Class to load main models."""
|
"""Class to load main models."""
|
||||||
|
|
||||||
def _load_model(
|
def _load_model(
|
||||||
@ -109,9 +108,12 @@ class T5Encoder8bCheckpointModel(ModelLoader):
|
|||||||
config: AnyModelConfig,
|
config: AnyModelConfig,
|
||||||
submodel_type: Optional[SubModelType] = None,
|
submodel_type: Optional[SubModelType] = None,
|
||||||
) -> AnyModel:
|
) -> AnyModel:
|
||||||
if not isinstance(config, T5Encoder8bConfig):
|
if not isinstance(config, T5EncoderBnbQuantizedLlmInt8bConfig):
|
||||||
raise ValueError("Only T5Encoder8bConfig models are currently supported here.")
|
raise ValueError("Only T5EncoderBnbQuantizedLlmInt8bConfig models are currently supported here.")
|
||||||
|
if not bnb_available:
|
||||||
|
raise ImportError(
|
||||||
|
"The bnb modules are not available. Please install bitsandbytes if available on your platform."
|
||||||
|
)
|
||||||
match submodel_type:
|
match submodel_type:
|
||||||
case SubModelType.Tokenizer2:
|
case SubModelType.Tokenizer2:
|
||||||
return T5Tokenizer.from_pretrained(Path(config.path) / "tokenizer_2", max_length=512)
|
return T5Tokenizer.from_pretrained(Path(config.path) / "tokenizer_2", max_length=512)
|
||||||
@ -241,9 +243,9 @@ class FluxBnbQuantizednf4bCheckpointModel(ModelLoader):
|
|||||||
flux_conf: Any,
|
flux_conf: Any,
|
||||||
) -> AnyModel:
|
) -> AnyModel:
|
||||||
assert isinstance(config, MainBnbQuantized4bCheckpointConfig)
|
assert isinstance(config, MainBnbQuantized4bCheckpointConfig)
|
||||||
if not bnb_nf4_available:
|
if not bnb_available:
|
||||||
raise ImportError(
|
raise ImportError(
|
||||||
"The bnb_nf4 module is not available. Please install bitsandbytes if available on your platform."
|
"The bnb modules are not available. Please install bitsandbytes if available on your platform."
|
||||||
)
|
)
|
||||||
model_path = Path(config.path)
|
model_path = Path(config.path)
|
||||||
dataclass_fields = {f.name for f in fields(FluxParams)}
|
dataclass_fields = {f.name for f in fields(FluxParams)}
|
||||||
|
@ -66,7 +66,7 @@ t5_8b_quantized_encoder = StarterModel(
|
|||||||
source="InvokeAI/t5-v1_1-xxl::bnb_llm_int8",
|
source="InvokeAI/t5-v1_1-xxl::bnb_llm_int8",
|
||||||
description="T5-XXL text encoder with bitsandbytes LLM.int8() quantization (used in FLUX pipelines). ~5GB",
|
description="T5-XXL text encoder with bitsandbytes LLM.int8() quantization (used in FLUX pipelines). ~5GB",
|
||||||
type=ModelType.T5Encoder,
|
type=ModelType.T5Encoder,
|
||||||
format=ModelFormat.T5Encoder8b,
|
format=ModelFormat.BnbQuantizedLlmInt8b,
|
||||||
)
|
)
|
||||||
|
|
||||||
clip_l_encoder = StarterModel(
|
clip_l_encoder = StarterModel(
|
||||||
|
@ -15,7 +15,13 @@ export const StarterModelsResultItem = memo(({ result }: Props) => {
|
|||||||
const _allSources = [
|
const _allSources = [
|
||||||
{
|
{
|
||||||
source: result.source,
|
source: result.source,
|
||||||
config: { name: result.name, description: result.description, type: result.type, base: result.base, format: result.format },
|
config: {
|
||||||
|
name: result.name,
|
||||||
|
description: result.description,
|
||||||
|
type: result.type,
|
||||||
|
base: result.base,
|
||||||
|
format: result.format,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
if (result.dependencies) {
|
if (result.dependencies) {
|
||||||
|
@ -6,7 +6,7 @@ import type { T5EncoderModelFieldInputInstance, T5EncoderModelFieldInputTemplate
|
|||||||
import { memo, useCallback } from 'react';
|
import { memo, useCallback } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useT5EncoderModels } from 'services/api/hooks/modelsByType';
|
import { useT5EncoderModels } from 'services/api/hooks/modelsByType';
|
||||||
import type { T5Encoder8bModelConfig, T5EncoderModelConfig } from 'services/api/types';
|
import type { T5EncoderBnbQuantizedLlmInt8bModelConfig, T5EncoderModelConfig } from 'services/api/types';
|
||||||
|
|
||||||
import type { FieldComponentProps } from './types';
|
import type { FieldComponentProps } from './types';
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ const T5EncoderModelFieldInputComponent = (props: Props) => {
|
|||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
const [modelConfigs, { isLoading }] = useT5EncoderModels();
|
const [modelConfigs, { isLoading }] = useT5EncoderModels();
|
||||||
const _onChange = useCallback(
|
const _onChange = useCallback(
|
||||||
(value: T5Encoder8bModelConfig | T5EncoderModelConfig | null) => {
|
(value: T5EncoderBnbQuantizedLlmInt8bModelConfig | T5EncoderModelConfig | null) => {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -10797,7 +10797,7 @@ export type components = {
|
|||||||
* @description Storage format of model.
|
* @description Storage format of model.
|
||||||
* @enum {string}
|
* @enum {string}
|
||||||
*/
|
*/
|
||||||
ModelFormat: "diffusers" | "checkpoint" | "lycoris" | "onnx" | "olive" | "embedding_file" | "embedding_folder" | "invokeai" | "t5_encoder" | "t5_encoder_8b" | "t5_encoder_4b" | "bnb_quantized_nf4b";
|
ModelFormat: "diffusers" | "checkpoint" | "lycoris" | "onnx" | "olive" | "embedding_file" | "embedding_folder" | "invokeai" | "t5_encoder" | "bnb_quantized_int8b" | "bnb_quantized_nf4b";
|
||||||
/** ModelIdentifierField */
|
/** ModelIdentifierField */
|
||||||
ModelIdentifierField: {
|
ModelIdentifierField: {
|
||||||
/**
|
/**
|
||||||
@ -11097,7 +11097,7 @@ export type components = {
|
|||||||
* Config Out
|
* Config Out
|
||||||
* @description After successful installation, this will hold the configuration object.
|
* @description After successful installation, this will hold the configuration object.
|
||||||
*/
|
*/
|
||||||
config_out?: (components["schemas"]["MainDiffusersConfig"] | components["schemas"]["MainCheckpointConfig"] | components["schemas"]["MainBnbQuantized4bCheckpointConfig"] | components["schemas"]["VAEDiffusersConfig"] | components["schemas"]["VAECheckpointConfig"] | components["schemas"]["ControlNetDiffusersConfig"] | components["schemas"]["ControlNetCheckpointConfig"] | components["schemas"]["LoRALyCORISConfig"] | components["schemas"]["LoRADiffusersConfig"] | components["schemas"]["T5EncoderConfig"] | components["schemas"]["T5Encoder8bConfig"] | components["schemas"]["TextualInversionFileConfig"] | components["schemas"]["TextualInversionFolderConfig"] | components["schemas"]["IPAdapterInvokeAIConfig"] | components["schemas"]["IPAdapterCheckpointConfig"] | components["schemas"]["T2IAdapterConfig"] | components["schemas"]["SpandrelImageToImageConfig"] | components["schemas"]["CLIPVisionDiffusersConfig"] | components["schemas"]["CLIPEmbedDiffusersConfig"]) | null;
|
config_out?: (components["schemas"]["MainDiffusersConfig"] | components["schemas"]["MainCheckpointConfig"] | components["schemas"]["MainBnbQuantized4bCheckpointConfig"] | components["schemas"]["VAEDiffusersConfig"] | components["schemas"]["VAECheckpointConfig"] | components["schemas"]["ControlNetDiffusersConfig"] | components["schemas"]["ControlNetCheckpointConfig"] | components["schemas"]["LoRALyCORISConfig"] | components["schemas"]["LoRADiffusersConfig"] | components["schemas"]["T5EncoderConfig"] | components["schemas"]["T5EncoderBnbQuantizedLlmInt8bConfig"] | components["schemas"]["TextualInversionFileConfig"] | components["schemas"]["TextualInversionFolderConfig"] | components["schemas"]["IPAdapterInvokeAIConfig"] | components["schemas"]["IPAdapterCheckpointConfig"] | components["schemas"]["T2IAdapterConfig"] | components["schemas"]["SpandrelImageToImageConfig"] | components["schemas"]["CLIPVisionDiffusersConfig"] | components["schemas"]["CLIPEmbedDiffusersConfig"]) | null;
|
||||||
/**
|
/**
|
||||||
* Inplace
|
* Inplace
|
||||||
* @description Leave model in its current location; otherwise install under models directory
|
* @description Leave model in its current location; otherwise install under models directory
|
||||||
@ -11183,7 +11183,7 @@ export type components = {
|
|||||||
* Config
|
* Config
|
||||||
* @description The model's config
|
* @description The model's config
|
||||||
*/
|
*/
|
||||||
config: components["schemas"]["MainDiffusersConfig"] | components["schemas"]["MainCheckpointConfig"] | components["schemas"]["MainBnbQuantized4bCheckpointConfig"] | components["schemas"]["VAEDiffusersConfig"] | components["schemas"]["VAECheckpointConfig"] | components["schemas"]["ControlNetDiffusersConfig"] | components["schemas"]["ControlNetCheckpointConfig"] | components["schemas"]["LoRALyCORISConfig"] | components["schemas"]["LoRADiffusersConfig"] | components["schemas"]["T5EncoderConfig"] | components["schemas"]["T5Encoder8bConfig"] | components["schemas"]["TextualInversionFileConfig"] | components["schemas"]["TextualInversionFolderConfig"] | components["schemas"]["IPAdapterInvokeAIConfig"] | components["schemas"]["IPAdapterCheckpointConfig"] | components["schemas"]["T2IAdapterConfig"] | components["schemas"]["SpandrelImageToImageConfig"] | components["schemas"]["CLIPVisionDiffusersConfig"] | components["schemas"]["CLIPEmbedDiffusersConfig"];
|
config: components["schemas"]["MainDiffusersConfig"] | components["schemas"]["MainCheckpointConfig"] | components["schemas"]["MainBnbQuantized4bCheckpointConfig"] | components["schemas"]["VAEDiffusersConfig"] | components["schemas"]["VAECheckpointConfig"] | components["schemas"]["ControlNetDiffusersConfig"] | components["schemas"]["ControlNetCheckpointConfig"] | components["schemas"]["LoRALyCORISConfig"] | components["schemas"]["LoRADiffusersConfig"] | components["schemas"]["T5EncoderConfig"] | components["schemas"]["T5EncoderBnbQuantizedLlmInt8bConfig"] | components["schemas"]["TextualInversionFileConfig"] | components["schemas"]["TextualInversionFolderConfig"] | components["schemas"]["IPAdapterInvokeAIConfig"] | components["schemas"]["IPAdapterCheckpointConfig"] | components["schemas"]["T2IAdapterConfig"] | components["schemas"]["SpandrelImageToImageConfig"] | components["schemas"]["CLIPVisionDiffusersConfig"] | components["schemas"]["CLIPEmbedDiffusersConfig"];
|
||||||
/**
|
/**
|
||||||
* @description The submodel type, if any
|
* @description The submodel type, if any
|
||||||
* @default null
|
* @default null
|
||||||
@ -11204,7 +11204,7 @@ export type components = {
|
|||||||
* Config
|
* Config
|
||||||
* @description The model's config
|
* @description The model's config
|
||||||
*/
|
*/
|
||||||
config: components["schemas"]["MainDiffusersConfig"] | components["schemas"]["MainCheckpointConfig"] | components["schemas"]["MainBnbQuantized4bCheckpointConfig"] | components["schemas"]["VAEDiffusersConfig"] | components["schemas"]["VAECheckpointConfig"] | components["schemas"]["ControlNetDiffusersConfig"] | components["schemas"]["ControlNetCheckpointConfig"] | components["schemas"]["LoRALyCORISConfig"] | components["schemas"]["LoRADiffusersConfig"] | components["schemas"]["T5EncoderConfig"] | components["schemas"]["T5Encoder8bConfig"] | components["schemas"]["TextualInversionFileConfig"] | components["schemas"]["TextualInversionFolderConfig"] | components["schemas"]["IPAdapterInvokeAIConfig"] | components["schemas"]["IPAdapterCheckpointConfig"] | components["schemas"]["T2IAdapterConfig"] | components["schemas"]["SpandrelImageToImageConfig"] | components["schemas"]["CLIPVisionDiffusersConfig"] | components["schemas"]["CLIPEmbedDiffusersConfig"];
|
config: components["schemas"]["MainDiffusersConfig"] | components["schemas"]["MainCheckpointConfig"] | components["schemas"]["MainBnbQuantized4bCheckpointConfig"] | components["schemas"]["VAEDiffusersConfig"] | components["schemas"]["VAECheckpointConfig"] | components["schemas"]["ControlNetDiffusersConfig"] | components["schemas"]["ControlNetCheckpointConfig"] | components["schemas"]["LoRALyCORISConfig"] | components["schemas"]["LoRADiffusersConfig"] | components["schemas"]["T5EncoderConfig"] | components["schemas"]["T5EncoderBnbQuantizedLlmInt8bConfig"] | components["schemas"]["TextualInversionFileConfig"] | components["schemas"]["TextualInversionFolderConfig"] | components["schemas"]["IPAdapterInvokeAIConfig"] | components["schemas"]["IPAdapterCheckpointConfig"] | components["schemas"]["T2IAdapterConfig"] | components["schemas"]["SpandrelImageToImageConfig"] | components["schemas"]["CLIPVisionDiffusersConfig"] | components["schemas"]["CLIPEmbedDiffusersConfig"];
|
||||||
/**
|
/**
|
||||||
* @description The submodel type, if any
|
* @description The submodel type, if any
|
||||||
* @default null
|
* @default null
|
||||||
@ -11345,7 +11345,7 @@ export type components = {
|
|||||||
*/
|
*/
|
||||||
ModelsList: {
|
ModelsList: {
|
||||||
/** Models */
|
/** Models */
|
||||||
models: (components["schemas"]["MainDiffusersConfig"] | components["schemas"]["MainCheckpointConfig"] | components["schemas"]["MainBnbQuantized4bCheckpointConfig"] | components["schemas"]["VAEDiffusersConfig"] | components["schemas"]["VAECheckpointConfig"] | components["schemas"]["ControlNetDiffusersConfig"] | components["schemas"]["ControlNetCheckpointConfig"] | components["schemas"]["LoRALyCORISConfig"] | components["schemas"]["LoRADiffusersConfig"] | components["schemas"]["T5EncoderConfig"] | components["schemas"]["T5Encoder8bConfig"] | components["schemas"]["TextualInversionFileConfig"] | components["schemas"]["TextualInversionFolderConfig"] | components["schemas"]["IPAdapterInvokeAIConfig"] | components["schemas"]["IPAdapterCheckpointConfig"] | components["schemas"]["T2IAdapterConfig"] | components["schemas"]["SpandrelImageToImageConfig"] | components["schemas"]["CLIPVisionDiffusersConfig"] | components["schemas"]["CLIPEmbedDiffusersConfig"])[];
|
models: (components["schemas"]["MainDiffusersConfig"] | components["schemas"]["MainCheckpointConfig"] | components["schemas"]["MainBnbQuantized4bCheckpointConfig"] | components["schemas"]["VAEDiffusersConfig"] | components["schemas"]["VAECheckpointConfig"] | components["schemas"]["ControlNetDiffusersConfig"] | components["schemas"]["ControlNetCheckpointConfig"] | components["schemas"]["LoRALyCORISConfig"] | components["schemas"]["LoRADiffusersConfig"] | components["schemas"]["T5EncoderConfig"] | components["schemas"]["T5EncoderBnbQuantizedLlmInt8bConfig"] | components["schemas"]["TextualInversionFileConfig"] | components["schemas"]["TextualInversionFolderConfig"] | components["schemas"]["IPAdapterInvokeAIConfig"] | components["schemas"]["IPAdapterCheckpointConfig"] | components["schemas"]["T2IAdapterConfig"] | components["schemas"]["SpandrelImageToImageConfig"] | components["schemas"]["CLIPVisionDiffusersConfig"] | components["schemas"]["CLIPEmbedDiffusersConfig"])[];
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Multiply Integers
|
* Multiply Integers
|
||||||
@ -13677,6 +13677,7 @@ export type components = {
|
|||||||
name: string;
|
name: string;
|
||||||
base: components["schemas"]["BaseModelType"];
|
base: components["schemas"]["BaseModelType"];
|
||||||
type: components["schemas"]["ModelType"];
|
type: components["schemas"]["ModelType"];
|
||||||
|
format?: components["schemas"]["ModelFormat"] | null;
|
||||||
/**
|
/**
|
||||||
* Is Installed
|
* Is Installed
|
||||||
* @default false
|
* @default false
|
||||||
@ -13695,6 +13696,7 @@ export type components = {
|
|||||||
name: string;
|
name: string;
|
||||||
base: components["schemas"]["BaseModelType"];
|
base: components["schemas"]["BaseModelType"];
|
||||||
type: components["schemas"]["ModelType"];
|
type: components["schemas"]["ModelType"];
|
||||||
|
format?: components["schemas"]["ModelFormat"] | null;
|
||||||
/**
|
/**
|
||||||
* Is Installed
|
* Is Installed
|
||||||
* @default false
|
* @default false
|
||||||
@ -14456,8 +14458,8 @@ export type components = {
|
|||||||
*/
|
*/
|
||||||
type: "t2i_adapter_output";
|
type: "t2i_adapter_output";
|
||||||
};
|
};
|
||||||
/** T5Encoder8bConfig */
|
/** T5EncoderBnbQuantizedLlmInt8bConfig */
|
||||||
T5Encoder8bConfig: {
|
T5EncoderBnbQuantizedLlmInt8bConfig: {
|
||||||
/**
|
/**
|
||||||
* Key
|
* Key
|
||||||
* @description A unique key for this model.
|
* @description A unique key for this model.
|
||||||
@ -14511,11 +14513,11 @@ export type components = {
|
|||||||
type: "t5_encoder";
|
type: "t5_encoder";
|
||||||
/**
|
/**
|
||||||
* Format
|
* Format
|
||||||
* @default t5_encoder_8b
|
* @default bnb_quantized_int8b
|
||||||
* @constant
|
* @constant
|
||||||
* @enum {string}
|
* @enum {string}
|
||||||
*/
|
*/
|
||||||
format: "t5_encoder_8b";
|
format: "bnb_quantized_int8b";
|
||||||
};
|
};
|
||||||
/** T5EncoderConfig */
|
/** T5EncoderConfig */
|
||||||
T5EncoderConfig: {
|
T5EncoderConfig: {
|
||||||
@ -15807,7 +15809,7 @@ export interface operations {
|
|||||||
[name: string]: unknown;
|
[name: string]: unknown;
|
||||||
};
|
};
|
||||||
content: {
|
content: {
|
||||||
"application/json": components["schemas"]["MainDiffusersConfig"] | components["schemas"]["MainCheckpointConfig"] | components["schemas"]["MainBnbQuantized4bCheckpointConfig"] | components["schemas"]["VAEDiffusersConfig"] | components["schemas"]["VAECheckpointConfig"] | components["schemas"]["ControlNetDiffusersConfig"] | components["schemas"]["ControlNetCheckpointConfig"] | components["schemas"]["LoRALyCORISConfig"] | components["schemas"]["LoRADiffusersConfig"] | components["schemas"]["T5EncoderConfig"] | components["schemas"]["T5Encoder8bConfig"] | components["schemas"]["TextualInversionFileConfig"] | components["schemas"]["TextualInversionFolderConfig"] | components["schemas"]["IPAdapterInvokeAIConfig"] | components["schemas"]["IPAdapterCheckpointConfig"] | components["schemas"]["T2IAdapterConfig"] | components["schemas"]["SpandrelImageToImageConfig"] | components["schemas"]["CLIPVisionDiffusersConfig"] | components["schemas"]["CLIPEmbedDiffusersConfig"];
|
"application/json": components["schemas"]["MainDiffusersConfig"] | components["schemas"]["MainCheckpointConfig"] | components["schemas"]["MainBnbQuantized4bCheckpointConfig"] | components["schemas"]["VAEDiffusersConfig"] | components["schemas"]["VAECheckpointConfig"] | components["schemas"]["ControlNetDiffusersConfig"] | components["schemas"]["ControlNetCheckpointConfig"] | components["schemas"]["LoRALyCORISConfig"] | components["schemas"]["LoRADiffusersConfig"] | components["schemas"]["T5EncoderConfig"] | components["schemas"]["T5EncoderBnbQuantizedLlmInt8bConfig"] | components["schemas"]["TextualInversionFileConfig"] | components["schemas"]["TextualInversionFolderConfig"] | components["schemas"]["IPAdapterInvokeAIConfig"] | components["schemas"]["IPAdapterCheckpointConfig"] | components["schemas"]["T2IAdapterConfig"] | components["schemas"]["SpandrelImageToImageConfig"] | components["schemas"]["CLIPVisionDiffusersConfig"] | components["schemas"]["CLIPEmbedDiffusersConfig"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
/** @description Validation Error */
|
/** @description Validation Error */
|
||||||
@ -15839,7 +15841,7 @@ export interface operations {
|
|||||||
[name: string]: unknown;
|
[name: string]: unknown;
|
||||||
};
|
};
|
||||||
content: {
|
content: {
|
||||||
"application/json": components["schemas"]["MainDiffusersConfig"] | components["schemas"]["MainCheckpointConfig"] | components["schemas"]["MainBnbQuantized4bCheckpointConfig"] | components["schemas"]["VAEDiffusersConfig"] | components["schemas"]["VAECheckpointConfig"] | components["schemas"]["ControlNetDiffusersConfig"] | components["schemas"]["ControlNetCheckpointConfig"] | components["schemas"]["LoRALyCORISConfig"] | components["schemas"]["LoRADiffusersConfig"] | components["schemas"]["T5EncoderConfig"] | components["schemas"]["T5Encoder8bConfig"] | components["schemas"]["TextualInversionFileConfig"] | components["schemas"]["TextualInversionFolderConfig"] | components["schemas"]["IPAdapterInvokeAIConfig"] | components["schemas"]["IPAdapterCheckpointConfig"] | components["schemas"]["T2IAdapterConfig"] | components["schemas"]["SpandrelImageToImageConfig"] | components["schemas"]["CLIPVisionDiffusersConfig"] | components["schemas"]["CLIPEmbedDiffusersConfig"];
|
"application/json": components["schemas"]["MainDiffusersConfig"] | components["schemas"]["MainCheckpointConfig"] | components["schemas"]["MainBnbQuantized4bCheckpointConfig"] | components["schemas"]["VAEDiffusersConfig"] | components["schemas"]["VAECheckpointConfig"] | components["schemas"]["ControlNetDiffusersConfig"] | components["schemas"]["ControlNetCheckpointConfig"] | components["schemas"]["LoRALyCORISConfig"] | components["schemas"]["LoRADiffusersConfig"] | components["schemas"]["T5EncoderConfig"] | components["schemas"]["T5EncoderBnbQuantizedLlmInt8bConfig"] | components["schemas"]["TextualInversionFileConfig"] | components["schemas"]["TextualInversionFolderConfig"] | components["schemas"]["IPAdapterInvokeAIConfig"] | components["schemas"]["IPAdapterCheckpointConfig"] | components["schemas"]["T2IAdapterConfig"] | components["schemas"]["SpandrelImageToImageConfig"] | components["schemas"]["CLIPVisionDiffusersConfig"] | components["schemas"]["CLIPEmbedDiffusersConfig"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
/** @description Bad request */
|
/** @description Bad request */
|
||||||
@ -15936,7 +15938,7 @@ export interface operations {
|
|||||||
[name: string]: unknown;
|
[name: string]: unknown;
|
||||||
};
|
};
|
||||||
content: {
|
content: {
|
||||||
"application/json": components["schemas"]["MainDiffusersConfig"] | components["schemas"]["MainCheckpointConfig"] | components["schemas"]["MainBnbQuantized4bCheckpointConfig"] | components["schemas"]["VAEDiffusersConfig"] | components["schemas"]["VAECheckpointConfig"] | components["schemas"]["ControlNetDiffusersConfig"] | components["schemas"]["ControlNetCheckpointConfig"] | components["schemas"]["LoRALyCORISConfig"] | components["schemas"]["LoRADiffusersConfig"] | components["schemas"]["T5EncoderConfig"] | components["schemas"]["T5Encoder8bConfig"] | components["schemas"]["TextualInversionFileConfig"] | components["schemas"]["TextualInversionFolderConfig"] | components["schemas"]["IPAdapterInvokeAIConfig"] | components["schemas"]["IPAdapterCheckpointConfig"] | components["schemas"]["T2IAdapterConfig"] | components["schemas"]["SpandrelImageToImageConfig"] | components["schemas"]["CLIPVisionDiffusersConfig"] | components["schemas"]["CLIPEmbedDiffusersConfig"];
|
"application/json": components["schemas"]["MainDiffusersConfig"] | components["schemas"]["MainCheckpointConfig"] | components["schemas"]["MainBnbQuantized4bCheckpointConfig"] | components["schemas"]["VAEDiffusersConfig"] | components["schemas"]["VAECheckpointConfig"] | components["schemas"]["ControlNetDiffusersConfig"] | components["schemas"]["ControlNetCheckpointConfig"] | components["schemas"]["LoRALyCORISConfig"] | components["schemas"]["LoRADiffusersConfig"] | components["schemas"]["T5EncoderConfig"] | components["schemas"]["T5EncoderBnbQuantizedLlmInt8bConfig"] | components["schemas"]["TextualInversionFileConfig"] | components["schemas"]["TextualInversionFolderConfig"] | components["schemas"]["IPAdapterInvokeAIConfig"] | components["schemas"]["IPAdapterCheckpointConfig"] | components["schemas"]["T2IAdapterConfig"] | components["schemas"]["SpandrelImageToImageConfig"] | components["schemas"]["CLIPVisionDiffusersConfig"] | components["schemas"]["CLIPEmbedDiffusersConfig"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
/** @description Bad request */
|
/** @description Bad request */
|
||||||
@ -16436,7 +16438,7 @@ export interface operations {
|
|||||||
[name: string]: unknown;
|
[name: string]: unknown;
|
||||||
};
|
};
|
||||||
content: {
|
content: {
|
||||||
"application/json": components["schemas"]["MainDiffusersConfig"] | components["schemas"]["MainCheckpointConfig"] | components["schemas"]["MainBnbQuantized4bCheckpointConfig"] | components["schemas"]["VAEDiffusersConfig"] | components["schemas"]["VAECheckpointConfig"] | components["schemas"]["ControlNetDiffusersConfig"] | components["schemas"]["ControlNetCheckpointConfig"] | components["schemas"]["LoRALyCORISConfig"] | components["schemas"]["LoRADiffusersConfig"] | components["schemas"]["T5EncoderConfig"] | components["schemas"]["T5Encoder8bConfig"] | components["schemas"]["TextualInversionFileConfig"] | components["schemas"]["TextualInversionFolderConfig"] | components["schemas"]["IPAdapterInvokeAIConfig"] | components["schemas"]["IPAdapterCheckpointConfig"] | components["schemas"]["T2IAdapterConfig"] | components["schemas"]["SpandrelImageToImageConfig"] | components["schemas"]["CLIPVisionDiffusersConfig"] | components["schemas"]["CLIPEmbedDiffusersConfig"];
|
"application/json": components["schemas"]["MainDiffusersConfig"] | components["schemas"]["MainCheckpointConfig"] | components["schemas"]["MainBnbQuantized4bCheckpointConfig"] | components["schemas"]["VAEDiffusersConfig"] | components["schemas"]["VAECheckpointConfig"] | components["schemas"]["ControlNetDiffusersConfig"] | components["schemas"]["ControlNetCheckpointConfig"] | components["schemas"]["LoRALyCORISConfig"] | components["schemas"]["LoRADiffusersConfig"] | components["schemas"]["T5EncoderConfig"] | components["schemas"]["T5EncoderBnbQuantizedLlmInt8bConfig"] | components["schemas"]["TextualInversionFileConfig"] | components["schemas"]["TextualInversionFolderConfig"] | components["schemas"]["IPAdapterInvokeAIConfig"] | components["schemas"]["IPAdapterCheckpointConfig"] | components["schemas"]["T2IAdapterConfig"] | components["schemas"]["SpandrelImageToImageConfig"] | components["schemas"]["CLIPVisionDiffusersConfig"] | components["schemas"]["CLIPEmbedDiffusersConfig"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
/** @description Bad request */
|
/** @description Bad request */
|
||||||
|
@ -53,7 +53,7 @@ export type IPAdapterModelConfig = S['IPAdapterInvokeAIConfig'] | S['IPAdapterCh
|
|||||||
export type T2IAdapterModelConfig = S['T2IAdapterConfig'];
|
export type T2IAdapterModelConfig = S['T2IAdapterConfig'];
|
||||||
type ClipEmbedModelConfig = S['CLIPEmbedDiffusersConfig'];
|
type ClipEmbedModelConfig = S['CLIPEmbedDiffusersConfig'];
|
||||||
export type T5EncoderModelConfig = S['T5EncoderConfig'];
|
export type T5EncoderModelConfig = S['T5EncoderConfig'];
|
||||||
export type T5Encoder8bModelConfig = S['T5Encoder8bConfig'];
|
export type T5EncoderBnbQuantizedLlmInt8bModelConfig = S['T5EncoderBnbQuantizedLlmInt8bConfig'];
|
||||||
export type SpandrelImageToImageModelConfig = S['SpandrelImageToImageConfig'];
|
export type SpandrelImageToImageModelConfig = S['SpandrelImageToImageConfig'];
|
||||||
type TextualInversionModelConfig = S['TextualInversionFileConfig'] | S['TextualInversionFolderConfig'];
|
type TextualInversionModelConfig = S['TextualInversionFileConfig'] | S['TextualInversionFolderConfig'];
|
||||||
type DiffusersModelConfig = S['MainDiffusersConfig'];
|
type DiffusersModelConfig = S['MainDiffusersConfig'];
|
||||||
@ -66,7 +66,7 @@ export type AnyModelConfig =
|
|||||||
| ControlNetModelConfig
|
| ControlNetModelConfig
|
||||||
| IPAdapterModelConfig
|
| IPAdapterModelConfig
|
||||||
| T5EncoderModelConfig
|
| T5EncoderModelConfig
|
||||||
| T5Encoder8bModelConfig
|
| T5EncoderBnbQuantizedLlmInt8bModelConfig
|
||||||
| ClipEmbedModelConfig
|
| ClipEmbedModelConfig
|
||||||
| T2IAdapterModelConfig
|
| T2IAdapterModelConfig
|
||||||
| SpandrelImageToImageModelConfig
|
| SpandrelImageToImageModelConfig
|
||||||
@ -96,7 +96,7 @@ export const isT2IAdapterModelConfig = (config: AnyModelConfig): config is T2IAd
|
|||||||
|
|
||||||
export const isT5EncoderModelConfig = (
|
export const isT5EncoderModelConfig = (
|
||||||
config: AnyModelConfig
|
config: AnyModelConfig
|
||||||
): config is T5EncoderModelConfig | T5Encoder8bModelConfig => {
|
): config is T5EncoderModelConfig | T5EncoderBnbQuantizedLlmInt8bModelConfig => {
|
||||||
return config.type === 't5_encoder';
|
return config.type === 't5_encoder';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user