Closed AugmentedRealityCat closed 1 month ago
If I try to run a simple workflow where I multiply an integer by 5 (as per the default anynode prompt), everything works well, both with Llama3 and Mistral. No error message whatsoever. Here is the log in case it has something interesting for you:
Generating Node function...
INPUT 5
LE: None
{'id': 'chatcmpl-975', 'object': 'chat.completion', 'created': 1716973829, 'model': 'mistral', 'system_fingerprint': 'fp_ollama', 'choices': [{'index': 0, 'message': {'role': 'assistant', 'content': ' ```python\nimport math\ndef generated_function(input_data):\n def multiply_by_five(x):\n return x * 5\n return multiply_by_five(input_data)\n```'}, 'finish_reason': 'stop'}], 'usage': {'prompt_tokens': 504, 'completion_tokens': 52, 'total_tokens': 556}}
Imports in code: ['import math']
Stored script:
def generated_function(input_data):
def multiply_by_five(x):
return x * 5
return multiply_by_five(input_data)
Function result: 25
Prompt executed in 4.62 seconds
got prompt
[rgthree] Using rgthree's optimized recursive execution.
Last Error: None
Function result: 25
Prompt executed in 0.00 seconds
I'll make more tests and see if I can get it to affect something else than a numeric value.
If you want me to test anything specifically, just let me know.
Fixed in latest update.
Anything I try to do with the Local version of Anynode now gives me the error message in the title. In the terminal window, the last line is:
SyntaxError: unterminated string literal (detected at line 1)
In Comfy's web UI, I get this error window:
It looks like the LLM actually manages to create some valid-looking code at first glance, but it then fails to execute it. It fails just after
Here's a Python function that takes in a tensor representing an image and outputs the same image but with inverted brightness:
In the test below I was trying to invert an image. The Anynode prompt was
I want you to output the image with inverted brightness.
I was using LLAMA3 (Meta-Llama-3-8B-Instruct).I tried to run it at least 10 times (more likely over 20 !) just to make sure code-autocorrect would not come to save me. It did not.
NOTE: since the error log contains the same symbols as those used on this web page to highlight code parts, the code I am pasting here was split in two parts. It should really be one single error message, containing both parts together as one.