TypeError: LTXVImgToVideo.generate() got an unexpected keyword argument 'strength'
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
### Expected Behavior
****Here is what VSCode copilot thinks****
Great question! You do have strength in your generate method for LTXVImgToVideoAdvanced, but the error is about the method you are calling inside it:
return nodes_lt.LTXVImgToVideo().generate(
positive=positive,
negative=negative,
vae=vae,
image=image,
width=width,
height=height,
length=length,
batch_size=batch_size,
strength=strength, # <-- This is the problem
)
Here, you are calling the generate method of LTXVImgToVideo from nodes_lt (not your own class), and that method does not accept a strength argument.
Why does this happen?
Your own generate method accepts strength—that's fine.
But you are passing strength to another class's generate method (LTXVImgToVideo in nodes_lt), and that method does not have strength in its parameters.
How to fix?
You need to add strength to the generate method of LTXVImgToVideo in the comfy_extras/nodes_lt.py file (or wherever it is defined), like this:
class LTXVImgToVideo:
def generate(
self,
positive,
negative,
vae,
image,
width,
height,
length,
batch_size,
strength=None, # <-- Add this
):
# ...existing code...
Or, if you don't want to use strength, you can just add it with a default value and ignore it.
***
Unfortunately, above solution didn't fix the issue. :(
### Actual Behavior
VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16
gguf qtypes: F32 (728), BF16 (7), Q4_K (336), Q6_K (144)
model weight dtype torch.bfloat16, manual cast: None
model_type FLUX
CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16
Requested to load MochiTEModel_
loaded completely 9822.8 9083.38671875 True
Using preset: 13b Dynamic
Skip steps sigma threshold: 0.997
Cfg star rescale: True
Sigma list: [1.0, 0.9933, 0.985, 0.9767, 0.9008, 0.618]
Cfg list: [1, 6, 8, 6, 1, 1]
Stg scale list: [0, 4, 4, 4, 2, 1]
Stg rescale list: [1, 0.5, 0.5, 1, 1, 1]
Stg layers indices list: [[11, 25, 35, 39], [22, 35, 39], [28], [28], [28], [28]]
optional_cond_images shape torch.Size([1, 512, 768, 3])
!!! Exception during processing !!! LTXVImgToVideo.generate() got an unexpected keyword argument 'strength'
Traceback (most recent call last):
File "F:\COMFY\ComfyUI_windows_portable\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 "F:\COMFY\ComfyUI_windows_portable\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 "F:\COMFY\ComfyUI_windows_portable\ComfyUI\execution.py", line 194, in _map_node_over_list
process_inputs(input_dict, i)
File "F:\COMFY\ComfyUI_windows_portable\ComfyUI\execution.py", line 183, in process_inputs
results.append(getattr(obj, func)(**inputs))
File "F:\COMFY\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-LTXVideo\easy_samplers.py", line 127, in sample
) = LTXVImgToVideo().generate(
TypeError: LTXVImgToVideo.generate() got an unexpected keyword argument 'strength'
### Steps to Reproduce
Running workflow from
https://huggingface.co/wsbagnsv1/ltxv-13b-0.9.7-dev-GGUF/tree/main
exampleworkflow_I2V.json
### Debug Logs
```powershell
VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16
gguf qtypes: F32 (728), BF16 (7), Q4_K (336), Q6_K (144)
model weight dtype torch.bfloat16, manual cast: None
model_type FLUX
CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16
Requested to load MochiTEModel_
loaded completely 9822.8 9083.38671875 True
Using preset: 13b Dynamic
Skip steps sigma threshold: 0.997
Cfg star rescale: True
Sigma list: [1.0, 0.9933, 0.985, 0.9767, 0.9008, 0.618]
Cfg list: [1, 6, 8, 6, 1, 1]
Stg scale list: [0, 4, 4, 4, 2, 1]
Stg rescale list: [1, 0.5, 0.5, 1, 1, 1]
Stg layers indices list: [[11, 25, 35, 39], [22, 35, 39], [28], [28], [28], [28]]
optional_cond_images shape torch.Size([1, 512, 768, 3])
!!! Exception during processing !!! LTXVImgToVideo.generate() got an unexpected keyword argument 'strength'
Traceback (most recent call last):
File "F:\COMFY\ComfyUI_windows_portable\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 "F:\COMFY\ComfyUI_windows_portable\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 "F:\COMFY\ComfyUI_windows_portable\ComfyUI\execution.py", line 194, in _map_node_over_list
process_inputs(input_dict, i)
File "F:\COMFY\ComfyUI_windows_portable\ComfyUI\execution.py", line 183, in process_inputs
results.append(getattr(obj, func)(**inputs))
File "F:\COMFY\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-LTXVideo\easy_samplers.py", line 127, in sample
) = LTXVImgToVideo().generate(
TypeError: LTXVImgToVideo.generate() got an unexpected keyword argument 'strength'
```
### Other
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.