This commit is contained in:
kk8bit
2025-04-26 17:53:08 +08:00
parent 1549228038
commit e9cb2e96c2
11 changed files with 33 additions and 33 deletions
+1 -1
View File
@@ -43,4 +43,4 @@ async def clean_vram(request):
except Exception as e:
return web.Response(text=f"Error cleaning VRAM: {str(e)}", status=500)
PromptServer.instance.routes.post("/kaytool/clean_vram")(clean_vram)
PromptServer.instance.routes.post("/KayTool/clean_vram")(clean_vram)
+3 -3
View File
@@ -104,7 +104,7 @@ class KayResourceMonitor:
async def send_message(self, data):
try:
await PromptServer.instance.send("kaytool.resources", data)
await PromptServer.instance.send("KayTool.resources", data)
except Exception:
pass
@@ -135,12 +135,12 @@ class KayResourceMonitor:
monitor = KayResourceMonitor(initial_rate=1.0)
routes = PromptServer.instance.routes
@routes.post("/kaytool/start_monitor")
@routes.post("/KayTool/start_monitor")
async def start_monitor_endpoint(request):
monitor.start()
return web.Response(text="Monitor started")
@routes.post("/kaytool/stop_monitor")
@routes.post("/KayTool/stop_monitor")
async def stop_monitor_endpoint(request):
monitor.stop()
return web.Response(text="Monitor stopped")