mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
chore: ruff formatting
This commit is contained in:
parent
56ac2104e3
commit
cd070d8be9
@ -7,6 +7,7 @@ import cv2
|
|||||||
import numpy
|
import numpy
|
||||||
from PIL import Image, ImageChops, ImageFilter, ImageOps
|
from PIL import Image, ImageChops, ImageFilter, ImageOps
|
||||||
|
|
||||||
|
from invokeai.app.invocations.constants import IMAGE_MODES
|
||||||
from invokeai.app.invocations.fields import (
|
from invokeai.app.invocations.fields import (
|
||||||
ColorField,
|
ColorField,
|
||||||
FieldDescriptions,
|
FieldDescriptions,
|
||||||
@ -16,7 +17,6 @@ from invokeai.app.invocations.fields import (
|
|||||||
WithMetadata,
|
WithMetadata,
|
||||||
)
|
)
|
||||||
from invokeai.app.invocations.primitives import ImageOutput
|
from invokeai.app.invocations.primitives import ImageOutput
|
||||||
from invokeai.app.invocations.constants import IMAGE_MODES
|
|
||||||
from invokeai.app.services.image_records.image_records_common import ImageCategory
|
from invokeai.app.services.image_records.image_records_common import ImageCategory
|
||||||
from invokeai.app.services.shared.invocation_context import InvocationContext
|
from invokeai.app.services.shared.invocation_context import InvocationContext
|
||||||
from invokeai.backend.image_util.invisible_watermark import InvisibleWatermark
|
from invokeai.backend.image_util.invisible_watermark import InvisibleWatermark
|
||||||
|
@ -5,8 +5,8 @@ from typing import TYPE_CHECKING, Optional
|
|||||||
from PIL.Image import Image
|
from PIL.Image import Image
|
||||||
from torch import Tensor
|
from torch import Tensor
|
||||||
|
|
||||||
from invokeai.app.invocations.fields import MetadataField, WithBoard, WithMetadata
|
|
||||||
from invokeai.app.invocations.constants import IMAGE_MODES
|
from invokeai.app.invocations.constants import IMAGE_MODES
|
||||||
|
from invokeai.app.invocations.fields import MetadataField, WithBoard, WithMetadata
|
||||||
from invokeai.app.services.boards.boards_common import BoardDTO
|
from invokeai.app.services.boards.boards_common import BoardDTO
|
||||||
from invokeai.app.services.config.config_default import InvokeAIAppConfig
|
from invokeai.app.services.config.config_default import InvokeAIAppConfig
|
||||||
from invokeai.app.services.image_records.image_records_common import ImageCategory, ResourceOrigin
|
from invokeai.app.services.image_records.image_records_common import ImageCategory, ResourceOrigin
|
||||||
@ -207,7 +207,9 @@ class ImagesInterface(InvocationContextInterface):
|
|||||||
try:
|
try:
|
||||||
image = image.convert(mode)
|
image = image.convert(mode)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
self._services.logger.warning(f"Could not convert image from {image.mode} to {mode}. Using original mode instead.")
|
self._services.logger.warning(
|
||||||
|
f"Could not convert image from {image.mode} to {mode}. Using original mode instead."
|
||||||
|
)
|
||||||
return image
|
return image
|
||||||
|
|
||||||
def get_metadata(self, image_name: str) -> Optional[MetadataField]:
|
def get_metadata(self, image_name: str) -> Optional[MetadataField]:
|
||||||
|
Loading…
Reference in New Issue
Block a user