From 5cab90a1bef7ac856f45c4edbdbfc27bf7068781 Mon Sep 17 00:00:00 2001 From: holonic Date: Mon, 3 Jun 2024 01:29:47 +0100 Subject: [PATCH] More whitelisted libs --- nodes/any.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nodes/any.py b/nodes/any.py index 2106bfa..ae97b5a 100644 --- a/nodes/any.py +++ b/nodes/any.py @@ -13,7 +13,7 @@ # - use re for parsing the python code instead of naively expecting the response to start with a python tag # Import common libs -import os, json, random, string, sys, math, datetime, collections, itertools, functools, urllib, shutil, re, torch, time, decimal, matplotlib, io, base64, wave, chromadb, uuid +import os, json, random, string, sys, math, datetime, collections, itertools, functools, urllib, shutil, re, torch, time, decimal, matplotlib, io, base64, wave, chromadb, uuid, scipy, torchaudio, torchvision, cv2, PIL import numpy import numpy as np import torch.nn.functional as F @@ -114,7 +114,7 @@ class AnyNode: NAME = "AnyNode" CATEGORY = "utils" - ALLOWED_IMPORTS = {"os", "re", "json", "random", "string", "sys", "math", "datetime", "collections", "itertools", "functools", "numpy", "openai", "traceback", "torch", "time", "sklearn", "torchvision", "matplotlib", "io", "base64", "wave", "google.generativeai", "chromadb", "uuid", "comfy"} + ALLOWED_IMPORTS = {"os", "re", "json", "random", "string", "sys", "math", "datetime", "collections", "itertools", "functools", "numpy", "openai", "traceback", "torch", "time", "sklearn", "torchvision", "matplotlib", "io", "base64", "wave", "google.generativeai", "chromadb", "uuid", "comfy", "scipy", "torchaudio", "torchvision", "cv2", "PIL"} CODING_ATTEMPTS = 3 def __init__(self):