|
@@ -156,7 +156,8 @@ def get_image(
|
|
|
add_sampling_metadata=True,
|
|
|
api_name="/generate"
|
|
|
)
|
|
|
- return FileResponse(result, background=background_tasks(remove_file, result))
|
|
|
+ background_tasks.add_task(remove_file, result)
|
|
|
+ return FileResponse(result, background=background_tasks)
|
|
|
|
|
|
@router.websocket("/sr")
|
|
|
async def websocket_endpoint(websocket: WebSocket):
|