shadowcz007 / comfyui-mixlab-nodes

Workflow-to-APP、ScreenShare&FloatingVideo、GPT & 3D、SpeechRecognition&TTS
https://mixlabnodes.com
MIT License
1.31k stars 82 forks source link

浮点滑条 Bug #238

Closed QL-boy closed 6 months ago

QL-boy commented 6 months ago

@shadowcz007 有关已合并的这个拉取请求的疑问 Pull requests 这个段代码的更改会导致负浮点滑条完全被破坏无法使用

报错代码如下:

Error occurred when executing FloatSlider:

object of type 'float' has no len()

File "D:\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "D:\AI\ComfyUI\execution.py", line 95, in get_output_data
output_is_list = [False] * len(results[0])

我简单修复了一下:

    RETURN_TYPES = ("FLOAT",) 
    RETURN_NAMES = ('FLOAT',)
    FUNCTION = "run"

    CATEGORY = "♾️Mixlab/Input"

    INPUT_IS_LIST = False
    OUTPUT_IS_LIST = (False,)

    def run(self, number, min_value, max_value, step):
        if number < min_value:
            number = min_value
        elif number > max_value:
            number = max_value
        return (number,)

麻烦更新修复一下

shadowcz007 commented 6 months ago

已修复更新