Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError: All tensors must have the same dtype.,when using gguf model in sageattention mode #353

Open
jasoncow007 opened this issue Jan 19, 2025 · 3 comments

Comments

@jasoncow007
Copy link

Traceback (most recent call last):
File "D:\ComfyUI-aki-v1.2\execution.py", line 327, 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-aki-v1.2\execution.py", line 202, 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-aki-v1.2\execution.py", line 174, in _map_node_over_list
process_inputs(input_dict, i)
File "D:\ComfyUI-aki-v1.2\execution.py", line 163, in process_inputs
results.append(getattr(obj, func)(**inputs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-CogVideoXWrapper\nodes.py", line 722, in process
latents = model["pipe"](
^^^^^^^^^^^^^^
File "D:\ComfyUI-aki-v1.2\python\Lib\site-packages\torch\utils_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-CogVideoXWrapper\pipeline_cogvideox.py", line 780, in call
noise_pred = self.transformer(
^^^^^^^^^^^^^^^^^
File "D:\ComfyUI-aki-v1.2\python\Lib\site-packages\torch\nn\modules\module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI-aki-v1.2\python\Lib\site-packages\torch\nn\modules\module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-CogVideoXWrapper\custom_cogvideox_transformer_3d.py", line 666, in forward
hidden_states, encoder_hidden_states = block(
^^^^^^
File "D:\ComfyUI-aki-v1.2\python\Lib\site-packages\torch\nn\modules\module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI-aki-v1.2\python\Lib\site-packages\torch\nn\modules\module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-CogVideoXWrapper\custom_cogvideox_transformer_3d.py", line 323, in forward
attn_hidden_states, attn_encoder_hidden_states = self.attn1(
^^^^^^^^^^^
File "D:\ComfyUI-aki-v1.2\python\Lib\site-packages\torch\nn\modules\module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI-aki-v1.2\python\Lib\site-packages\torch\nn\modules\module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI-aki-v1.2\python\Lib\site-packages\diffusers\models\attention_processor.py", line 495, in forward
return self.processor(
^^^^^^^^^^^^^^^
File "D:\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-CogVideoXWrapper\custom_cogvideox_transformer_3d.py", line 170, in call
hidden_states = self.attn_func(query, key, value, attn_mask=attention_mask, is_causal=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI-aki-v1.2\python\Lib\site-packages\torch_dynamo\eval_frame.py", line 632, in _fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-CogVideoXWrapper\custom_cogvideox_transformer_3d.py", line 66, in func
return sageattn(q, k, v, is_causal=is_causal, attn_mask=attn_mask)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI-aki-v1.2\python\Lib\site-packages\sageattention\core.py", line 79, in sageattn
assert q.dtype == k.dtype == v.dtype, "All tensors must have the same dtype."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: All tensors must have the same dtype.

@kijai
Copy link
Owner

kijai commented Jan 20, 2025

Should be fixed now.

@jasoncow007
Copy link
Author

Should be fixed now.

is it possible to set the framerate? the default is 16fps/s , could it be changed? like ltxv could be set

@kijai
Copy link
Owner

kijai commented Jan 23, 2025

Should be fixed now.

is it possible to set the framerate? the default is 16fps/s , could it be changed? like ltxv could be set

No, CogVideoX is trained on single fps, or at least doesn't have any fps conditioning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants