(
datas: dict,
)
| 41 | def update_diffusion_transformer_api(_: gr.Blocks, app: FastAPI, controller): |
| 42 | @app.post("/videox_fun/update_diffusion_transformer") |
| 43 | def _update_diffusion_transformer_api( |
| 44 | datas: dict, |
| 45 | ): |
| 46 | diffusion_transformer_path = datas.get('diffusion_transformer_path', 'none') |
| 47 | |
| 48 | try: |
| 49 | controller.update_diffusion_transformer( |
| 50 | diffusion_transformer_path |
| 51 | ) |
| 52 | comment = "Success" |
| 53 | except Exception as e: |
| 54 | torch.cuda.empty_cache() |
| 55 | comment = f"Error. error information is {str(e)}" |
| 56 | |
| 57 | return {"message": comment} |
| 58 | |
| 59 | def download_from_url(url, timeout=10): |
| 60 | try: |
nothing calls this directly
no test coverage detected