MCPcopy Create free account
hub / github.com/Netflix/void-model / _update_diffusion_transformer_api

Function _update_diffusion_transformer_api

videox_fun/api/api.py:43–57  ·  view source on GitHub ↗
(
        datas: dict,
    )

Source from the content-addressed store, hash-verified

41def 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
59def download_from_url(url, timeout=10):
60 try:

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected