Added Use search Value for search nodes + Allowing for custom endpoint

This commit is contained in:
Jack
2025-02-22 02:08:46 +02:00
parent 27f5d69b90
commit 29df6574ca
8 changed files with 98 additions and 27 deletions
+8 -2
View File
@@ -36,7 +36,6 @@ RUNWARE_REMBG_OUTPUT_FORMATS = {
)
}
RUNWARE_API_BASE_URL = "https://api.runware.ai/v1"
MAX_RETRIES = 2
RETRY_COOLDOWN = 2
@@ -104,16 +103,23 @@ def getMinImageCacheSize():
if min_image_cache_size and min_image_cache_size.isdigit():
return int(min_image_cache_size)
else:
min_image_cache_size = 100
min_image_cache_size = 150
os.environ["RUNWARE_MIN_IMAGE_CACHE_SIZE"] = str(min_image_cache_size)
return min_image_cache_size
def getCustomEndpoint():
custom_endpoint = os.getenv("RUNWARE_CUSTOM_ENDPOINT")
if custom_endpoint and isinstance(custom_endpoint, str):
return custom_endpoint
return "https://api.runware.ai/v1"
SESSION_TIMEOUT = getTimeout()
RUNWARE_API_KEY = getAPIKey()
OUTPUT_FORMAT = getOutputFormat()
OUTPUT_QUALITY = getOutputQuality()
ENABLE_IMAGES_CACHING = getEnableImagesCaching()
MIN_IMAGE_CACHE_SIZE = getMinImageCacheSize()
RUNWARE_API_BASE_URL = getCustomEndpoint()
def setEnvKey(keyName, keyValue):
comfyNodeRoot = Path(__file__).parent.parent.parent