Closed choilive closed 2 months ago
Can you trigger this question steadily? Please tell me how to do it if you can, it will help me to fix the problem. thank
Can you trigger this question steadily? Please tell me how to do it if you can, it will help me to fix the problem. thank
@mrhan1993 I looked into the related lines. The reason is ImageGenerationParams is not a dict, but the add_history() requires the first parameter to be dict type and has key "params", which doesn't exist in ImageGenerationParams either.
maybe this is one way to fix it https://github.com/mrhan1993/Fooocus-API/pull/271
Per logs - it appears that an error is thrown after the image is generated and the record is being created.
ERROR:root:'ImageGenerationParams' object is not subscriptable Traceback (most recent call last): File "/home/user/Fooocus/Fooocus-API/fooocusapi/worker.py", line 880, in process_generate yield_result(None, results, tasks) File "/home/user/Fooocus/Fooocus-API/fooocusapi/worker.py", line 113, in yield_result worker_queue.finish_task(async_task.job_id) File "/home/user/Fooocus/Fooocus-API/fooocusapi/task_queue.py", line 155, in finish_task add_history(task.req_param, task.type, task.job_id, File "/home/user/Fooocus/Fooocus-API/fooocusapi/sql_client.py", line 194, in add_history params = req_to_dict(params["params"]) TypeError: 'ImageGenerationParams' object is not subscriptable