asagi4 / comfyui-prompt-control

ComfyUI nodes for prompt editing and LoRA control
GNU General Public License v3.0
165 stars 14 forks source link

BUG: apply_lora_for_step() missing 5 required positional arguments: 'step', 'total_steps', 'state', 'original_model', and 'lora_cache' #37

Closed yeungmozhu closed 3 months ago

yeungmozhu commented 3 months ago
Traceback (most recent call last):
  File "D:\SDLocal\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
  File "D:\SDLocal\ComfyUI_windows_portable\ComfyUI\execution.py", line 81, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
  File "D:\SDLocal\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
  File "D:\SDLocal\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1344, in sample
    return common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise)
  File "D:\SDLocal\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1314, in common_ksampler
    samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,
  File "D:\SDLocal\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-prompt-control\prompt_control\hijack.py", line 39, in pc_sample
    r = cb(orig_sampler, *args, **kwargs)
  File "D:\SDLocal\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-prompt-control\prompt_control\node_lora.py", line 67, in sampler_cb
    apply_lora_for_step(start_step)
TypeError: apply_lora_for_step() missing 5 required positional arguments: 'step', 'total_steps', 'state', 'original_model', and 'lora_cache'
asagi4 commented 3 months ago

Hm, I refactored this recently; I must have missed testing something.