ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

!!! Exception during processing !!! 'VAE' object is not subscriptable

Open jasoncow007 opened this issue 1 year ago • 3 comments

Custom Node Testing

Expected Behavior

it runs without error the last day before update

Actual Behavior

!!! Exception during processing !!! 'VAE' object is not subscriptable Traceback (most recent call last): File "D:\ComfyUI-aki-v1.2\execution.py", line 496, in execute output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs) File "D:\ComfyUI-aki-v1.2\execution.py", line 315, in get_output_data return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs) File "D:\ComfyUI-aki-v1.2\execution.py", line 289, in _async_map_node_over_list await process_inputs(input_dict, i) File "D:\ComfyUI-aki-v1.2\execution.py", line 277, in process_inputs result = f(**inputs) File "D:\ComfyUI-aki-v1.2\comfy_extras\nodes_custom_sampler.py", line 822, in sample latent_image = latent["samples"] TypeError: 'VAE' object is not subscriptable

Steps to Reproduce

run wanvideo work flow with custom advaced sampler

Debug Logs

!!! Exception during processing !!! 'VAE' object is not subscriptable
Traceback (most recent call last):
  File "D:\ComfyUI-aki-v1.2\execution.py", line 496, in execute
    output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs)
  File "D:\ComfyUI-aki-v1.2\execution.py", line 315, in get_output_data
    return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs)
  File "D:\ComfyUI-aki-v1.2\execution.py", line 289, in _async_map_node_over_list
    await process_inputs(input_dict, i)
  File "D:\ComfyUI-aki-v1.2\execution.py", line 277, in process_inputs
    result = f(**inputs)
  File "D:\ComfyUI-aki-v1.2\comfy_extras\nodes_custom_sampler.py", line 822, in sample
    latent_image = latent["samples"]
TypeError: 'VAE' object is not subscriptable

Other

No response

jasoncow007 avatar Aug 18 '25 11:08 jasoncow007

it seems caused by wanvace node @tobbez

jasoncow007 avatar Aug 18 '25 12:08 jasoncow007

I'm getting the same error in a flux kontext workflow with a chain of edits that can be enabled/disabled by a Fast Group Bypasser (rgthree), and the resulting image is obtained via AnySwitch (rgthree) like this:

(disabled) [VAE Decode ] --> [ (1) AnySwitch ] --> [ Preview Image ]
      [ previous image ] --> [ (2)           ]

It seems to me that when AnySwitch tries to obtain its value, it first asks VAE decode, but instead of nothing it somehow returns a VAE, that the Preview Image then tries to preview

Zueuk avatar Aug 24 '25 08:08 Zueuk

@jasoncow007 How do you resolve this error?

gangdeq avatar Aug 27 '25 02:08 gangdeq