You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 3, 2025. It is now read-only.
Python 3.12
uv pip install flash-attn --no-build-isolation (not from link)
When auto-captioning is enabled, the function start_caption_generation—which is defined as an asynchronous generator—gets awaited directly in the on_import_success function. This results in the following error:
TypeError: object async_generator can't be used in 'await' expression
Context
The error occurs because start_caption_generation uses yield to produce multiple updates and therefore returns an async generator. Directly awaiting an async generator is not allowed. Instead, the generator should either be iterated over using an async for loop or scheduled as a background task using asyncio.create_task.
This issue is observed in app.py around line 1004 in the on_import_success function.
Python 3.12
uv pip install flash-attn --no-build-isolation (not from link)
When auto-captioning is enabled, the function
start_caption_generation—which is defined as an asynchronous generator—gets awaited directly in theon_import_successfunction. This results in the following error:Context
The error occurs because
start_caption_generationusesyieldto produce multiple updates and therefore returns an async generator. Directly awaiting an async generator is not allowed. Instead, the generator should either be iterated over using anasync forloop or scheduled as a background task usingasyncio.create_task.This issue is observed in
app.pyaround line 1004 in theon_import_successfunction.Code Snippet
In
app.py(around line 1004):