This commit is contained in:
cubiq
2024-08-28 18:12:25 +02:00
parent 73888fe0d3
commit 1ab2482e01
2 changed files with 11 additions and 11 deletions
+2 -10
View File
@@ -10,8 +10,8 @@ import torch
import torch.nn.functional as F
import torchvision.transforms.v2 as T
import warnings
warnings.filterwarnings('ignore', module="torchvision")
#import warnings
#warnings.filterwarnings('ignore', module="torchvision")
import math
import os
import numpy as np
@@ -944,12 +944,6 @@ class ImagePosterize:
return(image,)
SCRIPT_DIR = Path(__file__).parent
folder_paths.add_model_folder_path("luts", (SCRIPT_DIR / "luts").as_posix())
folder_paths.add_model_folder_path(
"luts", (Path(folder_paths.models_dir) / "luts").as_posix()
)
# From https://github.com/yoonsikp/pycubelut/blob/master/pycubelut.py (MIT license)
class ImageApplyLUT:
@classmethod
@@ -1727,7 +1721,6 @@ IMAGE_CLASS_MAPPINGS = {
"ImageToDevice+": ImageToDevice,
"ImagePreviewFromLatent+": ImagePreviewFromLatent,
"NoiseFromImage+": NoiseFromImage,
"StringToLuts+": StringToLuts,
#"ExtractKeyframes+": ExtractKeyframes,
}
@@ -1773,5 +1766,4 @@ IMAGE_NAME_MAPPINGS = {
"ImageToDevice+": "🔧 Image To Device",
"ImagePreviewFromLatent+": "🔧 Image Preview From Latent",
"NoiseFromImage+": "🔧 Noise From Image",
"StringToLuts+": "🔧 String To Luts",
}
+9 -1
View File
@@ -2,10 +2,18 @@ import torch
import numpy as np
import scipy
import os
import re
#import re
from pathlib import Path
import folder_paths
FONTS_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "fonts")
SCRIPT_DIR = Path(__file__).parent
folder_paths.add_model_folder_path("luts", (SCRIPT_DIR / "luts").as_posix())
folder_paths.add_model_folder_path(
"luts", (Path(folder_paths.models_dir) / "luts").as_posix()
)
# from https://github.com/pythongosssss/ComfyUI-Custom-Scripts
class AnyType(str):
def __ne__(self, __value: object) -> bool: