diff --git a/py/context_utils.py b/py/context_utils.py index 393fd38..ee71aad 100644 --- a/py/context_utils.py +++ b/py/context_utils.py @@ -17,6 +17,7 @@ _all_context_input_output_data = { "seed": ("seed", "INT", "SEED"), "steps": ("steps", "INT", "STEPS"), "step_refiner": ("step_refiner", "INT", "STEP_REFINER"), + "cfg": ("cfg", "FLOAT", "CFG"), "sampler": ("sampler", comfy.samplers.KSampler.SAMPLERS, "SAMPLER"), "scheduler": ("scheduler", comfy.samplers.KSampler.SCHEDULERS, "SCHEDULER"), "clip_width": ("clip_width", "INT", "CLIP_WIDTH"), @@ -29,7 +30,7 @@ _all_context_input_output_data = { "control_net": ("control_net", "CONTROL_NET", "CONTROL_NET"), } -force_input_types = ["INT", "STRING"] +force_input_types = ["INT", "STRING", "FLOAT"] force_input_names = ["sampler", "scheduler"] diff --git a/py/ksampler_config.py b/py/ksampler_config.py index 2d350dd..043ea49 100644 --- a/py/ksampler_config.py +++ b/py/ksampler_config.py @@ -27,10 +27,10 @@ class RgthreeKSamplerConfig: "max": MAX_RESOLUTION, "step": 1, }), - "cfg": ("INT", { - "default": 7, - "min": 1, - "max": MAX_RESOLUTION, + "cfg": ("FLOAT", { + "default": 8.0, + "min": 0.0, + "max": 100.0, "step": 0.5, }), "sampler_name": (comfy.samplers.KSampler.SAMPLERS,), @@ -40,7 +40,7 @@ class RgthreeKSamplerConfig: }, } - RETURN_TYPES = ("INT", "INT", "INT", comfy.samplers.KSampler.SAMPLERS, + RETURN_TYPES = ("INT", "INT", "FLOAT", comfy.samplers.KSampler.SAMPLERS, comfy.samplers.KSampler.SCHEDULERS) RETURN_NAMES = ("STEPS", "REFINER_STEP", "CFG", "SAMPLER", "SCHEDULER") FUNCTION = "main"