-
Notifications
You must be signed in to change notification settings - Fork 785
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
!!! Exception during processing !!! 'AutoencoderKLCogVideoX' object has no attribute '_clear_fake_context_parallel_cache' #445
Comments
I noticed that in nodes.py, the vae._clear_fake_context_parallel_cache() are all wrapped with a try except. mz_enable_var_encode_tiling.py, vae._clear_fake_context_parallel_cache() doesn't have the same, I added the try, except around the vae._clear_fake_context_parallel_cache() instances and all is working fine now! |
I'm also having this same issue. I tried the fix that @s2n-Gribbly mentioned, but I don't have the vae._clear_fake_context_parallel_cache() in my mz_enable_vae_encode_tiling.py file. There is a self._clear_fake_context_parallel_cache(). I tried to wrap this in the same try/except and it caused more errors. I possibly did it incorrectly. Do you mind posting exactly how you modified the file? |
Ok, I've successfully fixed the error on two separate machines.... These are steps I came across accidentally: I dropped a new CogVideo ImageEncode node, I restarted comfyUI and reloaded the workflow, disabled "enable_tlling" and it works fine now, no error. Edit: I reconnected the original node, disabled tiling and this also works, so it's not the new node, it's the "enable_tiling" What's weird is that I tried to disable that initially and still got the error. Edit 2: More detective work... Once the error occurs once, you will need to restart comfyUI or it will continue to error even though "enable_tiling" is disabled. |
Has this issue been resolved? |
System Info / 系統信息
cuda:12.6
torch: 2.5.0+cu124
Python: 3.12.5
Information / 问题信息
Reproduction / 复现过程
when i run cogvideox-i2v, i will get the error in this node: CogVideo ImageEncode
here is the log :
!!! Exception during processing !!! 'AutoencoderKLCogVideoX' object has no attribute '_clear_fake_context_parallel_cache'
Traceback (most recent call last):
File "E:\comfyui-aki\ComfyUI-aki-v1.4\execution.py", line 323, 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 "E:\comfyui-aki\ComfyUI-aki-v1.4\execution.py", line 198, 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 "E:\comfyui-aki\ComfyUI-aki-v1.4\execution.py", line 169, in _map_node_over_list
process_inputs(input_dict, i)
File "E:\comfyui-aki\ComfyUI-aki-v1.4\execution.py", line 158, in process_inputs
results.append(getattr(obj, func)(**inputs))
File "E:\comfyui-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-CogVideoXWrapper\nodes.py", line 986, in encode
latents = vae.encode(image_chunk)
File "E:\comfyui-aki\ComfyUI-aki-v1.4\python\lib\site-packages\diffusers\utils\accelerate_utils.py", line 46, in wrapper
return method(self, *args, **kwargs)
File "E:\comfyui-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-CogVideoXWrapper\mz_enable_vae_encode_tiling.py", line 27, in encode
h = self._encode(x)
File "E:\comfyui-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-CogVideoXWrapper\mz_enable_vae_encode_tiling.py", line 113, in _encode
return self.tiled_encode(x)
File "E:\comfyui-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-CogVideoXWrapper\mz_enable_vae_encode_tiling.py", line 86, in tiled_encode
self._clear_fake_context_parallel_cache()
File "E:\comfyui-aki\ComfyUI-aki-v1.4\python\lib\site-packages\diffusers\models\modeling_utils.py", line 155, in getattr
return super().getattr(name)
File "E:\comfyui-aki\ComfyUI-aki-v1.4\python\lib\site-packages\torch\nn\modules\module.py", line 1709, in getattr
raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'")
AttributeError: 'AutoencoderKLCogVideoX' object has no attribute '_clear_fake_context_parallel_cache'
Expected behavior / 期待表现
no error
The text was updated successfully, but these errors were encountered: