replicate / cog-sdxl

Stable Diffusion XL training and inference as a cog model
https://replicate.com/stability-ai/sdxl
Apache License 2.0
203 stars 105 forks source link

Exception in ASGI application #57

Open felixding opened 2 months ago

felixding commented 2 months ago

I pulled the repo and ran the following command:

cog train -i input_images=@example_datasets/zeke.zip -i use_face_detection_instead=True

However, I encountered the following error:

...
Running prediction...
{"logger": "uvicorn.error", "timestamp": "2024-06-26T02:08:26.505009Z", "exception": "Traceback (most recent call last):\n  File \"/root/.pyenv/versions/3.9.19/lib/python3.9/site-packages/uvicorn/protocols/http/httptools_impl.py\", line 399, in run_asgi\n    result = await app(  # type: ignore[func-returns-value]\n  File \"/root/.pyenv/versions/3.9.19/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py\", line 70, in __call__\n    return await self.app(scope, receive, send)\n  File \"/root/.pyenv/versions/3.9.19/lib/python3.9/site-packages/fastapi/applications.py\", line 284, in __call__\n    await super().__call__(scope, receive, send)\n  File \"/root/.pyenv/versions/3.9.19/lib/python3.9/site-packages/starlette/applications.py\", line 122, in __call__\n    await self.middleware_stack(scope, receive, send)\n  File \"/root/.pyenv/versions/3.9.19/lib/python3.9/site-packages/starlette/middleware/errors.py\", line 184, in __call__\n    raise exc\n  File \"/root/.pyenv/versions/3.9.19/lib/python3.9/site-packages/starlette/middleware/errors.py\", line 162, in __call__\n    await self.app(scope, receive, _send)\n  File \"/root/.pyenv/versions/3.9.19/lib/python3.9/site-packages/starlette/middleware/exceptions.py\", line 79, in __call__\n    raise exc\n  File \"/root/.pyenv/versions/3.9.19/lib/python3.9/site-packages/starlette/middleware/exceptions.py\", line 68, in __call__\n    await self.app(scope, receive, sender)\n  File \"/root/.pyenv/versions/3.9.19/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py\", line 20, in __call__\n    raise e\n  File \"/root/.pyenv/versions/3.9.19/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py\", line 17, in __call__\n    await self.app(scope, receive, send)\n  File \"/root/.pyenv/versions/3.9.19/lib/python3.9/site-packages/starlette/routing.py\", line 718, in __call__\n    await route.handle(scope, receive, send)\n  File \"/root/.pyenv/versions/3.9.19/lib/python3.9/site-packages/starlette/routing.py\", line 276, in handle\n    await self.app(scope, receive, send)\n  File \"/root/.pyenv/versions/3.9.19/lib/python3.9/site-packages/starlette/routing.py\", line 66, in app\n    response = await func(request)\n  File \"/root/.pyenv/versions/3.9.19/lib/python3.9/site-packages/fastapi/applications.py\", line 239, in openapi\n    return JSONResponse(self.openapi())\n  File \"/root/.pyenv/versions/3.9.19/lib/python3.9/site-packages/fastapi/applications.py\", line 214, in openapi\n    self.openapi_schema = get_openapi(\n  File \"/root/.pyenv/versions/3.9.19/lib/python3.9/site-packages/fastapi/openapi/utils.py\", line 421, in get_openapi\n    definitions = get_model_definitions(\n  File \"/root/.pyenv/versions/3.9.19/lib/python3.9/site-packages/fastapi/utils.py\", line 64, in get_model_definitions\n    model_name = model_name_map[model]\nKeyError: <enum 'lr_scheduler'>", "severity": "ERROR", "message": "Exception in ASGI application\n"}
ⅹ Failed to get OpenAPI schema: 500

Could you please provide some insight into what might be going wrong?

dannypostma commented 1 month ago

Same issue here