don't require cv2 for everything

This commit is contained in:
kijai 2024-08-04 16:35:30 +03:00
parent dc479dc2ef
commit c08c858374
2 changed files with 9 additions and 2 deletions

View File

@ -8,7 +8,11 @@ import os
import re
import json
import hashlib
import cv2
try:
import cv2
except:
print("OpenCV not installed")
pass
from PIL import ImageGrab, ImageDraw, ImageFont, Image, ImageSequence, ImageOps
from nodes import MAX_RESOLUTION, SaveImage

View File

@ -5,7 +5,10 @@ from PIL import Image, ImageDraw, ImageFilter, ImageFont
import scipy.ndimage
import numpy as np
import matplotlib.pyplot as plt
try:
import matplotlib.pyplot as plt
except:
print("Matplotlib not installed")
from contextlib import nullcontext
import os