mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
chore: rebase conflicts
This commit is contained in:
parent
f50f95a81d
commit
d1fce4b70b
@ -8,7 +8,7 @@ from PIL import Image, PngImagePlugin
|
||||
from PIL.Image import Image as PILImageType
|
||||
from send2trash import send2trash
|
||||
|
||||
from invokeai.app.services.config.invokeai_config import InvokeAIAppConfig
|
||||
from invokeai.app.services.invoker import Invoker
|
||||
from invokeai.app.util.thumbnails import get_thumbnail_name, make_thumbnail
|
||||
|
||||
from .image_files_base import ImageFileStorageBase
|
||||
@ -22,7 +22,7 @@ class DiskImageFileStorage(ImageFileStorageBase):
|
||||
__cache_ids: Queue # TODO: this is an incredibly naive cache
|
||||
__cache: Dict[Path, PILImageType]
|
||||
__max_cache_size: int
|
||||
__compress_level: int
|
||||
__invoker: Invoker
|
||||
|
||||
def __init__(self, output_folder: Union[str, Path]):
|
||||
self.__cache = dict()
|
||||
@ -31,10 +31,12 @@ class DiskImageFileStorage(ImageFileStorageBase):
|
||||
|
||||
self.__output_folder: Path = output_folder if isinstance(output_folder, Path) else Path(output_folder)
|
||||
self.__thumbnails_folder = self.__output_folder / "thumbnails"
|
||||
self.__compress_level = InvokeAIAppConfig.get_config().png_compress_level
|
||||
# Validate required output folders at launch
|
||||
self.__validate_storage_folders()
|
||||
|
||||
def start(self, invoker: Invoker) -> None:
|
||||
self.__invoker = invoker
|
||||
|
||||
def get(self, image_name: str) -> PILImageType:
|
||||
try:
|
||||
image_path = self.get_path(image_name)
|
||||
@ -78,7 +80,12 @@ class DiskImageFileStorage(ImageFileStorageBase):
|
||||
if original_workflow is not None:
|
||||
pnginfo.add_text("invokeai_workflow", original_workflow)
|
||||
|
||||
image.save(image_path, "PNG", pnginfo=pnginfo, compress_level=self.__compress_level)
|
||||
image.save(
|
||||
image_path,
|
||||
"PNG",
|
||||
pnginfo=pnginfo,
|
||||
compress_level=self.__invoker.services.configuration.png_compress_level,
|
||||
)
|
||||
|
||||
thumbnail_name = get_thumbnail_name(image_name)
|
||||
thumbnail_path = self.get_path(thumbnail_name, thumbnail=True)
|
||||
|
@ -2679,6 +2679,12 @@ export type components = {
|
||||
* @default 400
|
||||
*/
|
||||
tile_size?: number;
|
||||
/**
|
||||
* Tile Size
|
||||
* @description Tile size for tiled ESRGAN upscaling (0=tiling disabled)
|
||||
* @default 400
|
||||
*/
|
||||
tile_size?: number;
|
||||
/**
|
||||
* Type
|
||||
* @default esrgan
|
||||
@ -3351,6 +3357,9 @@ export type components = {
|
||||
| components['schemas']['ColorInvocation']
|
||||
| components['schemas']['ConditioningInvocation']
|
||||
| components['schemas']['ConditioningCollectionInvocation']
|
||||
| components['schemas']['FaceOffInvocation']
|
||||
| components['schemas']['FaceMaskInvocation']
|
||||
| components['schemas']['FaceIdentifierInvocation']
|
||||
| components['schemas']['ControlNetInvocation']
|
||||
| components['schemas']['ImageProcessorInvocation']
|
||||
| components['schemas']['MainModelLoaderInvocation']
|
||||
@ -3360,8 +3369,9 @@ export type components = {
|
||||
| components['schemas']['SeamlessModeInvocation']
|
||||
| components['schemas']['SDXLModelLoaderInvocation']
|
||||
| components['schemas']['SDXLRefinerModelLoaderInvocation']
|
||||
| components['schemas']['MetadataAccumulatorInvocation']
|
||||
| components['schemas']['IPAdapterInvocation']
|
||||
| components['schemas']['MetadataAccumulatorInvocation']
|
||||
| components['schemas']['T2IAdapterInvocation']
|
||||
| components['schemas']['CompelInvocation']
|
||||
| components['schemas']['SDXLCompelPromptInvocation']
|
||||
| components['schemas']['SDXLRefinerCompelPromptInvocation']
|
||||
@ -3410,6 +3420,7 @@ export type components = {
|
||||
| components['schemas']['MultiplyInvocation']
|
||||
| components['schemas']['DivideInvocation']
|
||||
| components['schemas']['RandomIntInvocation']
|
||||
| components['schemas']['RandomFloatInvocation']
|
||||
| components['schemas']['FloatToIntegerInvocation']
|
||||
| components['schemas']['RoundInvocation']
|
||||
| components['schemas']['IntegerMathInvocation']
|
||||
@ -3516,8 +3527,9 @@ export type components = {
|
||||
| components['schemas']['SeamlessModeOutput']
|
||||
| components['schemas']['SDXLModelLoaderOutput']
|
||||
| components['schemas']['SDXLRefinerModelLoaderOutput']
|
||||
| components['schemas']['MetadataAccumulatorOutput']
|
||||
| components['schemas']['IPAdapterOutput']
|
||||
| components['schemas']['MetadataAccumulatorOutput']
|
||||
| components['schemas']['T2IAdapterOutput']
|
||||
| components['schemas']['ClipSkipInvocationOutput']
|
||||
| components['schemas']['SchedulerOutput']
|
||||
| components['schemas']['ONNXModelLoaderOutput']
|
||||
@ -3526,7 +3538,9 @@ export type components = {
|
||||
| components['schemas']['String2Output']
|
||||
| components['schemas']['GraphInvocationOutput']
|
||||
| components['schemas']['IterateInvocationOutput']
|
||||
| components['schemas']['CollectInvocationOutput'];
|
||||
| components['schemas']['CollectInvocationOutput']
|
||||
| components['schemas']['FaceMaskOutput']
|
||||
| components['schemas']['FaceOffOutput'];
|
||||
};
|
||||
/**
|
||||
* Errors
|
||||
@ -10208,30 +10222,6 @@ export type components = {
|
||||
/** Ui Order */
|
||||
ui_order?: number;
|
||||
};
|
||||
/**
|
||||
* StableDiffusion1ModelFormat
|
||||
* @description An enumeration.
|
||||
* @enum {string}
|
||||
*/
|
||||
T2IAdapterModelFormat: 'diffusers';
|
||||
/**
|
||||
* ControlNetModelFormat
|
||||
* @description An enumeration.
|
||||
* @enum {string}
|
||||
*/
|
||||
ControlNetModelFormat: 'checkpoint' | 'diffusers';
|
||||
/**
|
||||
* StableDiffusion2ModelFormat
|
||||
* @description An enumeration.
|
||||
* @enum {string}
|
||||
*/
|
||||
StableDiffusion2ModelFormat: 'checkpoint' | 'diffusers';
|
||||
/**
|
||||
* StableDiffusionXLModelFormat
|
||||
* @description An enumeration.
|
||||
* @enum {string}
|
||||
*/
|
||||
T2IAdapterModelFormat: 'diffusers';
|
||||
/**
|
||||
* StableDiffusionXLModelFormat
|
||||
* @description An enumeration.
|
||||
@ -10249,25 +10239,37 @@ export type components = {
|
||||
* @description An enumeration.
|
||||
* @enum {string}
|
||||
*/
|
||||
StableDiffusion1ModelFormat: 'checkpoint' | 'diffusers';
|
||||
ControlNetModelFormat: 'checkpoint' | 'diffusers';
|
||||
/**
|
||||
* StableDiffusionOnnxModelFormat
|
||||
* @description An enumeration.
|
||||
* @enum {string}
|
||||
*/
|
||||
StableDiffusionOnnxModelFormat: 'olive' | 'onnx';
|
||||
/**
|
||||
* StableDiffusion1ModelFormat
|
||||
* @description An enumeration.
|
||||
* @enum {string}
|
||||
*/
|
||||
StableDiffusion1ModelFormat: 'checkpoint' | 'diffusers';
|
||||
/**
|
||||
* T2IAdapterModelFormat
|
||||
* @description An enumeration.
|
||||
* @enum {string}
|
||||
*/
|
||||
T2IAdapterModelFormat: 'diffusers';
|
||||
/**
|
||||
* CLIPVisionModelFormat
|
||||
* @description An enumeration.
|
||||
* @enum {string}
|
||||
*/
|
||||
CLIPVisionModelFormat: 'diffusers';
|
||||
/**
|
||||
* StableDiffusion2ModelFormat
|
||||
* @description An enumeration.
|
||||
* @enum {string}
|
||||
*/
|
||||
StableDiffusion2ModelFormat: 'checkpoint' | 'diffusers';
|
||||
/**
|
||||
* ControlNetModelFormat
|
||||
* @description An enumeration.
|
||||
* @enum {string}
|
||||
*/
|
||||
ControlNetModelFormat: 'checkpoint' | 'diffusers';
|
||||
};
|
||||
responses: never;
|
||||
parameters: never;
|
||||
@ -10409,6 +10411,9 @@ export type operations = {
|
||||
| components['schemas']['ColorInvocation']
|
||||
| components['schemas']['ConditioningInvocation']
|
||||
| components['schemas']['ConditioningCollectionInvocation']
|
||||
| components['schemas']['FaceOffInvocation']
|
||||
| components['schemas']['FaceMaskInvocation']
|
||||
| components['schemas']['FaceIdentifierInvocation']
|
||||
| components['schemas']['ControlNetInvocation']
|
||||
| components['schemas']['ImageProcessorInvocation']
|
||||
| components['schemas']['MainModelLoaderInvocation']
|
||||
@ -10418,8 +10423,9 @@ export type operations = {
|
||||
| components['schemas']['SeamlessModeInvocation']
|
||||
| components['schemas']['SDXLModelLoaderInvocation']
|
||||
| components['schemas']['SDXLRefinerModelLoaderInvocation']
|
||||
| components['schemas']['MetadataAccumulatorInvocation']
|
||||
| components['schemas']['IPAdapterInvocation']
|
||||
| components['schemas']['MetadataAccumulatorInvocation']
|
||||
| components['schemas']['T2IAdapterInvocation']
|
||||
| components['schemas']['CompelInvocation']
|
||||
| components['schemas']['SDXLCompelPromptInvocation']
|
||||
| components['schemas']['SDXLRefinerCompelPromptInvocation']
|
||||
@ -10468,6 +10474,7 @@ export type operations = {
|
||||
| components['schemas']['MultiplyInvocation']
|
||||
| components['schemas']['DivideInvocation']
|
||||
| components['schemas']['RandomIntInvocation']
|
||||
| components['schemas']['RandomFloatInvocation']
|
||||
| components['schemas']['FloatToIntegerInvocation']
|
||||
| components['schemas']['RoundInvocation']
|
||||
| components['schemas']['IntegerMathInvocation']
|
||||
@ -10563,6 +10570,9 @@ export type operations = {
|
||||
| components['schemas']['ColorInvocation']
|
||||
| components['schemas']['ConditioningInvocation']
|
||||
| components['schemas']['ConditioningCollectionInvocation']
|
||||
| components['schemas']['FaceOffInvocation']
|
||||
| components['schemas']['FaceMaskInvocation']
|
||||
| components['schemas']['FaceIdentifierInvocation']
|
||||
| components['schemas']['ControlNetInvocation']
|
||||
| components['schemas']['ImageProcessorInvocation']
|
||||
| components['schemas']['MainModelLoaderInvocation']
|
||||
@ -10572,8 +10582,9 @@ export type operations = {
|
||||
| components['schemas']['SeamlessModeInvocation']
|
||||
| components['schemas']['SDXLModelLoaderInvocation']
|
||||
| components['schemas']['SDXLRefinerModelLoaderInvocation']
|
||||
| components['schemas']['MetadataAccumulatorInvocation']
|
||||
| components['schemas']['IPAdapterInvocation']
|
||||
| components['schemas']['MetadataAccumulatorInvocation']
|
||||
| components['schemas']['T2IAdapterInvocation']
|
||||
| components['schemas']['CompelInvocation']
|
||||
| components['schemas']['SDXLCompelPromptInvocation']
|
||||
| components['schemas']['SDXLRefinerCompelPromptInvocation']
|
||||
@ -10622,6 +10633,7 @@ export type operations = {
|
||||
| components['schemas']['MultiplyInvocation']
|
||||
| components['schemas']['DivideInvocation']
|
||||
| components['schemas']['RandomIntInvocation']
|
||||
| components['schemas']['RandomFloatInvocation']
|
||||
| components['schemas']['FloatToIntegerInvocation']
|
||||
| components['schemas']['RoundInvocation']
|
||||
| components['schemas']['IntegerMathInvocation']
|
||||
|
Loading…
Reference in New Issue
Block a user