ceruleandeep / ComfyUI-LLaVA-Captioner

A ComfyUI extension for chatting with your images with LLaVA. Runs locally, no external services, no filter.
GNU General Public License v3.0
98 stars 11 forks source link

error, failed to create llama_context #7

Open altruios opened 6 months ago

altruios commented 6 months ago

I'm not too familiar with python, but looks like a async/loading issue? It was working and then suddenly it wasn't. I am using two nodes in my project. the error disappears if I reload the server - I run one prompt successfully (at least, it is variable, but less than five each time), and then the error return.

  File "/home/altruios/AI/ComfyUI/execution.py", line 155, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/altruios/AI/ComfyUI/execution.py", line 85, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/altruios/AI/ComfyUI/execution.py", line 78, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/altruios/AI/ComfyUI/custom_nodes/ComfyUI-LLaVA-Captioner/llava.py", line 229, in caption
    llava = wait_for_async(lambda: get_llava(model, mm_proj, -1))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/altruios/AI/ComfyUI/custom_nodes/ComfyUI-LLaVA-Captioner/llava.py", line 168, in wait_for_async
    loop.run_until_complete(run_async())
  File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/altruios/AI/ComfyUI/custom_nodes/ComfyUI-LLaVA-Captioner/llava.py", line 158, in run_async
    r = await async_fn()
        ^^^^^^^^^^^^^^^^
  File "/home/altruios/AI/ComfyUI/custom_nodes/ComfyUI-LLaVA-Captioner/llava.py", line 88, in get_llava
    llm = Llama(
          ^^^^^^
  File "/home/altruios/AI/ComfyUI/lib/python3.11/site-packages/llama_cpp/llama.py", line 325, in __init__
    self._ctx = _LlamaContext(
                ^^^^^^^^^^^^^^
  File "/home/altruios/AI/ComfyUI/lib/python3.11/site-packages/llama_cpp/_internals.py", line 265, in __init__
    raise ValueError("Failed to create llama_context")
ValueError: Failed to create llama_context