Closed RedFoxNightfox closed 7 months ago
I ran the code through an AI along with the error message, and it says the following:
The error UnboundLocalError: local variable 'current_image' referenced before assignment occurs because the variable current_image is referenced before it's assigned a value within the loop. This happens when the loop for item in model_images['items'] doesn't find a matching pic['id'], hence current_image is not assigned within that loop, but it's being referenced later.
To fix this error, you can initialize current_image outside of the loop and set it to None initially. Then, inside the loop, if a matching pic['id'] is found, you can update current_image.
so it seems the error is occuring when the extention does not find a pic['id'] value.
Thanks for reporting! I'll make sure to post a fix for this shortly, it looks like there is a better way of fetching the prompt info for images rather than using the current images endpoint, so I'll implement that in a bit! :)
Should now be fixed in the latest commit! :)
I'll mark this as resolved 👍🏻
Describe the bug.
UnboundLocalError: local variable 'current_image' referenced before assignment
Steps to reproduce the problem.
Expected behavior
Expected behavior is for there to not be an error.
System info
Console logs
Additional information
No response