start_diffusion_training is async but called _preflight_gated_base inline; it does a blocking urllib urlopen HEAD to Hugging Face (up to a 5s timeout) to detect a gated/unauthorized base repo. On a slow or unreachable network that stalled the FastAPI event loop, freezing every concurrent status/progress/cancel request until it returned or timed out. Wrap it in asyncio.to_thread, matching the dataset preflight and GPU cleanup just below it. Regression test asserts it runs off the coroutine thread. |
||
|---|---|---|
| .. | ||
| assets | ||
| auth | ||
| core | ||
| hub | ||
| loggers | ||
| models | ||
| plugins | ||
| requirements | ||
| routes | ||
| state | ||
| storage | ||
| tests | ||
| utils | ||
| __init__.py | ||
| _platform_compat.py | ||
| cloudflare_tunnel.py | ||
| colab.py | ||
| main.py | ||
| run.py | ||
| startup_banner.py | ||