|
import comfy.sd
|
|
|
|
|
|
class Inputfloat001:
|
|
RETURN_TYPES = ("FLOAT",)
|
|
RETURN_NAMES = ("FLOAT",)
|
|
FUNCTION = "get_float"
|
|
CATEGORY = "InputValuesPack/utils"
|
|
|
|
@classmethod
|
|
def INPUT_TYPES(cls):
|
|
return {"required": {
|
|
"float": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 100.0, "step":0.01,})
|
|
}
|
|
}
|
|
|
|
def get_float(self, float):
|
|
return (float,)
|
|
|
|
|
|
class Inputfloat005:
|
|
RETURN_TYPES = ("FLOAT",)
|
|
RETURN_NAMES = ("FLOAT",)
|
|
FUNCTION = "get_float"
|
|
CATEGORY = "InputValuesPack/utils"
|
|
|
|
@classmethod
|
|
def INPUT_TYPES(cls):
|
|
return {"required": {
|
|
"float": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 100.0, "step":0.05,})
|
|
}
|
|
}
|
|
|
|
def get_float(self, float):
|
|
return (float,)
|
|
|
|
|
|
class Inputfloat01:
|
|
RETURN_TYPES = ("FLOAT",)
|
|
RETURN_NAMES = ("FLOAT",)
|
|
FUNCTION = "get_float"
|
|
CATEGORY = "InputValuesPack/utils"
|
|
|
|
@classmethod
|
|
def INPUT_TYPES(cls):
|
|
return {"required": {
|
|
"float": ("FLOAT", {"default": 8.0, "min": 0.0, "max": 100.0, "step":0.1,})
|
|
}
|
|
}
|
|
|
|
def get_float(self, float):
|
|
return (float,)
|
|
|
|
|
|
class Inputfloat05:
|
|
RETURN_TYPES = ("FLOAT",)
|
|
RETURN_NAMES = ("FLOAT",)
|
|
FUNCTION = "get_float"
|
|
CATEGORY = "InputValuesPack/utils"
|
|
|
|
@classmethod
|
|
def INPUT_TYPES(cls):
|
|
return {"required": {
|
|
"float": ("FLOAT", {"default": 8.0, "min": 0.0, "max": 100.0, "step":0.5,})
|
|
}
|
|
}
|
|
|
|
def get_float(self, float):
|
|
return (float,)
|
|
|
|
|
|
class Inputfloat1:
|
|
RETURN_TYPES = ("FLOAT",)
|
|
RETURN_NAMES = ("FLOAT",)
|
|
FUNCTION = "get_float"
|
|
CATEGORY = "InputValuesPack/utils"
|
|
|
|
@classmethod
|
|
def INPUT_TYPES(cls):
|
|
return {"required": {
|
|
"float": ("FLOAT", {"default": 8.0, "min": 0.0, "max": 100.0, "step":1,})
|
|
}
|
|
}
|
|
|
|
def get_float(self, float):
|
|
return (float,)
|
|
|
|
|
|
class Inputint1:
|
|
RETURN_TYPES = ("INT",)
|
|
RETURN_NAMES = ("INT",)
|
|
FUNCTION = "get_int"
|
|
CATEGORY = "InputValuesPack/utils"
|
|
|
|
@classmethod
|
|
def INPUT_TYPES(cls):
|
|
return {"required": {
|
|
"int": ("INT", {"default": 8.0, "min": 0.0, "max": 1000.0, "step":1,})
|
|
}
|
|
}
|
|
|
|
def get_int(self, int):
|
|
return (int,)
|
|
|
|
|
|
class GenerationInputValues:
|
|
RETURN_TYPES = ("INT", "FLOAT", "FLOAT", comfy.samplers.KSampler.SAMPLERS, comfy.samplers.KSampler.SCHEDULERS,"INT",)
|
|
RETURN_NAMES = ("steps", "cfg", "denoise", "sampler_name", "scheduler","seed_value",)
|
|
FUNCTION = "get_values"
|
|
CATEGORY = "InputValuesPack/utils"
|
|
|
|
@classmethod
|
|
def INPUT_TYPES(cls):
|
|
return {
|
|
"required": {
|
|
"steps": ("INT", {"default": 20, "min": 0, "max": 100, "step": 1}),
|
|
"cfg": ("FLOAT", {"default": 7.0, "min": 0.0, "max": 30.0, "step": 0.5}),
|
|
"denoise": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01}),
|
|
"sampler_name": (comfy.samplers.KSampler.SAMPLERS,),
|
|
"scheduler": (comfy.samplers.KSampler.SCHEDULERS,),
|
|
"seed_value": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff}),
|
|
}
|
|
}
|
|
|
|
def get_values(self, steps, cfg, denoise, sampler_name, scheduler,seed_value):
|
|
return (steps, cfg, denoise, sampler_name, scheduler,seed_value,)
|
|
|
|
|
|
class SamplerSelector:
|
|
CATEGORY = 'InputValuesPack/utils'
|
|
RETURN_TYPES = (comfy.samplers.KSampler.SAMPLERS,)
|
|
RETURN_NAMES = ("sampler_name",)
|
|
FUNCTION = "get_names"
|
|
|
|
@classmethod
|
|
def INPUT_TYPES(cls):
|
|
return {"required": {"sampler_name": (comfy.samplers.KSampler.SAMPLERS,)}}
|
|
|
|
def get_names(self, sampler_name):
|
|
return (sampler_name,)
|
|
|
|
|
|
class SchedulerSelector:
|
|
CATEGORY = 'InputValuesPack/utils'
|
|
RETURN_TYPES = (comfy.samplers.KSampler.SCHEDULERS,)
|
|
RETURN_NAMES = ("scheduler",)
|
|
FUNCTION = "get_names"
|
|
|
|
@classmethod
|
|
def INPUT_TYPES(cls):
|
|
return {"required": {"scheduler": (comfy.samplers.KSampler.SCHEDULERS,)}}
|
|
|
|
def get_names(self, scheduler):
|
|
return (scheduler,)
|
|
|
|
|
|
NODE_CLASS_MAPPINGS = {
|
|
"Input float 001": Inputfloat001,
|
|
"Input float 005": Inputfloat005,
|
|
"Input float 01": Inputfloat01,
|
|
"Input float 05": Inputfloat05,
|
|
"Input float 1": Inputfloat1,
|
|
"Input int 1": Inputint1,
|
|
"Generation Input Values": GenerationInputValues,
|
|
"Sampler Selector Input": SamplerSelector,
|
|
"Scheduler Selector Input": SchedulerSelector,
|
|
}
|
|
|
|
|
|
|
|
|