debug 输出都显示 steps 已经是 <class 'int'>,但依然报 linspace(): argument 'steps' (position 3) must be int, not str,
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 155
Description
### Expected Behavior
DEBUG main steps type: value: 20
DEBUG steps type: steps: 20
DEBUG y_params['steps'] type: y_params['steps']: 20
DEBUG y_model.steps type: y_model.steps: None
DEBUG y_model.__dict__['steps'] type: y_model.__dict__['steps']: None
!!! Exception during processing !!! linspace(): argument 'steps' (position 3) must be int, not str
Traceback (most recent call last):
File "D:\ComfyUI_windows\ComfyUI\execution.py", line 347, in execute
output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows\ComfyUI\execution.py", line 222, in get_output_data
return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows\ComfyUI\execution.py", line 194, in _map_node_over_list
process_inputs(input_dict, i)
File "D:\ComfyUI_windows\ComfyUI\execution.py", line 183, in process_inputs
results.append(getattr(obj, func)(**inputs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows\ComfyUI\custom_nodes\xy_compare.py", line 274, in generate_xy_compare
sampler = comfy.samplers.KSampler(
^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows\ComfyUI\comfy\samplers.py", line 1083, in __init__
self.set_steps(steps, denoise)
File "D:\ComfyUI_windows\ComfyUI\comfy\samplers.py", line 1104, in set_steps
self.sigmas = self.calculate_sigmas(steps).to(self.device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows\ComfyUI\comfy\samplers.py", line 1095, in calculate_sigmas
sigmas = calculate_sigmas(self.model.get_model_object("model_sampling"), self.scheduler, steps)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows\ComfyUI\comfy\samplers.py", line 1055, in calculate_sigmas
return handler.handler(model_sampling, steps)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows\ComfyUI\comfy\samplers.py", line 433, in normal_scheduler
timesteps = torch.linspace(start, end, steps)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: linspace(): argument 'steps' (position 3) must be int, not str
Prompt executed in 15.15 seconds
### Actual Behavior
DEBUG main steps type: value: 20
DEBUG steps type: steps: 20
DEBUG y_params['steps'] type: y_params['steps']: 20
DEBUG y_model.steps type: y_model.steps: None
DEBUG y_model.__dict__['steps'] type: y_model.__dict__['steps']: None
!!! Exception during processing !!! linspace(): argument 'steps' (position 3) must be int, not str
Traceback (most recent call last):
File "D:\ComfyUI_windows\ComfyUI\execution.py", line 347, in execute
output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows\ComfyUI\execution.py", line 222, in get_output_data
return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows\ComfyUI\execution.py", line 194, in _map_node_over_list
process_inputs(input_dict, i)
File "D:\ComfyUI_windows\ComfyUI\execution.py", line 183, in process_inputs
results.append(getattr(obj, func)(**inputs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows\ComfyUI\custom_nodes\xy_compare.py", line 274, in generate_xy_compare
sampler = comfy.samplers.KSampler(
^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows\ComfyUI\comfy\samplers.py", line 1083, in __init__
self.set_steps(steps, denoise)
File "D:\ComfyUI_windows\ComfyUI\comfy\samplers.py", line 1104, in set_steps
self.sigmas = self.calculate_sigmas(steps).to(self.device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows\ComfyUI\comfy\samplers.py", line 1095, in calculate_sigmas
sigmas = calculate_sigmas(self.model.get_model_object("model_sampling"), self.scheduler, steps)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows\ComfyUI\comfy\samplers.py", line 1055, in calculate_sigmas
return handler.handler(model_sampling, steps)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows\ComfyUI\comfy\samplers.py", line 433, in normal_scheduler
timesteps = torch.linspace(start, end, steps)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: linspace(): argument 'steps' (position 3) must be int, not str
Prompt executed in 15.15 seconds
### Steps to Reproduce
debug 输出都显示 steps 已经是 ,但依然报 linspace(): argument 'steps' (position 3) must be int, not str,
### Debug Logs
```powershell
DEBUG main steps type: value: 20
DEBUG steps type: steps: 20
DEBUG y_params['steps'] type: y_params['steps']: 20
DEBUG y_model.steps type: y_model.steps: None
DEBUG y_model.__dict__['steps'] type: y_model.__dict__['steps']: None
!!! Exception during processing !!! linspace(): argument 'steps' (position 3) must be int, not str
Traceback (most recent call last):
File "D:\ComfyUI_windows\ComfyUI\execution.py", line 347, in execute
output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows\ComfyUI\execution.py", line 222, in get_output_data
return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows\ComfyUI\execution.py", line 194, in _map_node_over_list
process_inputs(input_dict, i)
File "D:\ComfyUI_windows\ComfyUI\execution.py", line 183, in process_inputs
results.append(getattr(obj, func)(**inputs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows\ComfyUI\custom_nodes\xy_compare.py", line 274, in generate_xy_compare
sampler = comfy.samplers.KSampler(
^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows\ComfyUI\comfy\samplers.py", line 1083, in __init__
self.set_steps(steps, denoise)
File "D:\ComfyUI_windows\ComfyUI\comfy\samplers.py", line 1104, in set_steps
self.sigmas = self.calculate_sigmas(steps).to(self.device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows\ComfyUI\comfy\samplers.py", line 1095, in calculate_sigmas
sigmas = calculate_sigmas(self.model.get_model_object("model_sampling"), self.scheduler, steps)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows\ComfyUI\comfy\samplers.py", line 1055, in calculate_sigmas
return handler.handler(model_sampling, steps)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows\ComfyUI\comfy\samplers.py", line 433, in normal_scheduler
timesteps = torch.linspace(start, end, steps)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: linspace(): argument 'steps' (position 3) must be int, not str
Prompt executed in 15.15 seconds
```
### Other
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.