InvokeAI/invokeai/backend/image_util/__init__.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
669 B
Python
Raw Normal View History

2023-03-03 06:02:00 +00:00
"""
Initialization file for invokeai.backend.image_util methods.
2023-03-03 06:02:00 +00:00
"""
from .patchmatch import PatchMatch
2023-03-03 06:02:00 +00:00
from .pngwriter import PngWriter, PromptFormatter, retrieve_metadata, write_metadata
from .seamless import configure_model_padding
from .txt2mask import Txt2Mask
from .util import InitImageResizer, make_grid
2023-03-03 06:02:00 +00:00
2023-07-27 14:54:01 +00:00
def debug_image(debug_image, debug_text, debug_show=True, debug_result=False, debug_status=False):
if not debug_status:
return
image_copy = debug_image.copy().convert("RGBA")
ImageDraw.Draw(image_copy).text((5, 5), debug_text, (255, 0, 0))
if debug_show:
image_copy.show()
if debug_result:
return image_copy