Files
JaredTherriault-ComfyUI-JNodes/py/misc.py
T
JaredTherriault 7ceb555e56 Initial Commit
-ImageDrawer (image feed, lora picker, image history, etc)
-EditAttention improvements
-Status indicators (percentage in title, favicon, progress bar on floating menu)
-Font control for textareas
-Token count node
-png_info manipulation nodes
-Synced string literals with external text files
-Parameter lists
-Save Video improvements over VHS
-Custom modal to replace lightbox
-Mouse over images to see exif/png_info
-Yet another dynamic prompts implementation with randomization controls
-Yet another Wildcards implementation
-Commenting out prompts support (just add # before each line you want to be ignored or encapsulate specific text on a line with ## on either side "## Commented text ##") built into Wildcards node, will be separated next time
-Prompt Editor (search and replace text in any text, intended for prompts to change certain trigger words, for example an embedding named '3mb3dd1n4' can be changed to 'embedding')
-Selector nodes that can be randomized based on seed (e.g. to select a random checkpoint name)
-Get Temp Directory, Get Output Directory
2024-01-15 13:36:49 -08:00

43 lines
860 B
Python

import os
import folder_paths
from .logger import logger
class GetTempDirectory:
RETURN_TYPES = ("STRING",)
RETURN_NAMES = ("temp_dir",)
FUNCTION = "get_dir"
@classmethod
def INPUT_TYPES(cls):
return {}
def get_dir(self):
return (folder_paths.get_temp_directory(),)
class GetOutputDirectory:
RETURN_TYPES = ("STRING",)
RETURN_NAMES = ("output_dir",)
FUNCTION = "get_dir"
@classmethod
def INPUT_TYPES(cls):
return {}
def get_dir(self):
return (folder_paths.get_output_directory(),)
class StringLiteral:
RETURN_TYPES = ("STRING",)
FUNCTION = "get_string"
@classmethod
def INPUT_TYPES(cls):
return {"required": {"string": ("STRING", {"default": "", "multiline": True})}}
def get_string(self, string):
return (string,)