v1.0.1
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
#from .combinatorial import DPCombinatorialGenerator
|
||||
from .feeling_lucky import DPFeelingLucky
|
||||
#from .jinja import DPJinja
|
||||
from .magicprompt import DPMagicPrompt
|
||||
#from .output_node import OutputString
|
||||
#from .random import DPRandomGenerator
|
||||
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
#"DPRandomGenerator": DPRandomGenerator,
|
||||
#"DPCombinatorialGenerator": DPCombinatorialGenerator,
|
||||
"DPFeelingLucky": DPFeelingLucky,
|
||||
#"DPJinja": DPJinja,
|
||||
"DPMagicPrompt": DPMagicPrompt,
|
||||
#"DPOutput": OutputString,
|
||||
}
|
||||
|
||||
# A dictionary that contains the friendly/humanly readable titles for the nodes
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
#"DPRandomGenerator": "Random Prompts",
|
||||
#"DPCombinatorialGenerator": "Combinatorial Prompts",
|
||||
"DPFeelingLucky": "I'm Feeling Lucky",
|
||||
#"DPJinja": "Jinja2 Templates",
|
||||
"DPMagicPrompt": "Magic Prompt",
|
||||
#"DPOutput": "OutputString",
|
||||
}
|
||||
|
||||
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]
|
||||
@@ -1,18 +0,0 @@
|
||||
'''
|
||||
from functools import lru_cache
|
||||
|
||||
from dynamicprompts.enums import SamplingMethod
|
||||
from dynamicprompts.sampling_context import SamplingContext
|
||||
|
||||
from .sampler import DPAbstractSamplerNode
|
||||
|
||||
|
||||
class DPCombinatorialGenerator(DPAbstractSamplerNode):
|
||||
@property
|
||||
@lru_cache(maxsize=1)
|
||||
def context(self) -> SamplingContext:
|
||||
return SamplingContext(
|
||||
wildcard_manager=self._wildcard_manager,
|
||||
default_sampling_method=SamplingMethod.COMBINATORIAL,
|
||||
)
|
||||
'''
|
||||
@@ -1,13 +0,0 @@
|
||||
'''
|
||||
from dynamicprompts.generators import JinjaGenerator
|
||||
|
||||
from .generator import DPGeneratorNode
|
||||
|
||||
|
||||
class DPJinja(DPGeneratorNode):
|
||||
def generate_prompt(self, text):
|
||||
prompt_generator = JinjaGenerator()
|
||||
|
||||
all_prompts = prompt_generator.generate(text, 1) or [""]
|
||||
return str(all_prompts[0])
|
||||
'''
|
||||
@@ -1,20 +0,0 @@
|
||||
'''
|
||||
class OutputString:
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {
|
||||
"text": ("STRING", {}),
|
||||
},
|
||||
}
|
||||
|
||||
RETURN_TYPES = ()
|
||||
FUNCTION = "output_string"
|
||||
|
||||
OUTPUT_NODE = True
|
||||
|
||||
CATEGORY = "utils"
|
||||
|
||||
def output_string(self, text):
|
||||
return ({"ui": {"string": text}},)
|
||||
'''
|
||||
@@ -1,18 +0,0 @@
|
||||
'''
|
||||
from functools import lru_cache
|
||||
|
||||
from dynamicprompts.enums import SamplingMethod
|
||||
from dynamicprompts.sampling_context import SamplingContext
|
||||
|
||||
from .sampler import DPAbstractSamplerNode
|
||||
|
||||
|
||||
class DPRandomGenerator(DPAbstractSamplerNode):
|
||||
@property
|
||||
@lru_cache(maxsize=1)
|
||||
def context(self) -> SamplingContext:
|
||||
return SamplingContext(
|
||||
wildcard_manager=self._wildcard_manager,
|
||||
default_sampling_method=SamplingMethod.RANDOM,
|
||||
)
|
||||
'''
|
||||
Reference in New Issue
Block a user