mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix debug_image to not crash with non-RGB images.
This commit is contained in:
parent
875312080d
commit
b2664e807e
18
ldm/util.py
18
ldm/util.py
@ -1,17 +1,13 @@
|
||||
import importlib
|
||||
|
||||
import torch
|
||||
import numpy as np
|
||||
import math
|
||||
from collections import abc
|
||||
from einops import rearrange
|
||||
from functools import partial
|
||||
|
||||
import multiprocessing as mp
|
||||
from threading import Thread
|
||||
from queue import Queue
|
||||
|
||||
from collections import abc
|
||||
from inspect import isfunction
|
||||
from queue import Queue
|
||||
from threading import Thread
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
|
||||
|
||||
@ -250,7 +246,7 @@ def debug_image(debug_image, debug_text, debug_show=True, debug_result=False, de
|
||||
if not debug_status:
|
||||
return
|
||||
|
||||
image_copy = debug_image.copy()
|
||||
image_copy = debug_image.copy().convert("RGBA")
|
||||
ImageDraw.Draw(image_copy).text(
|
||||
(5, 5),
|
||||
debug_text,
|
||||
|
Loading…
Reference in New Issue
Block a user