Save accumulator without rerunning workflow

This commit is contained in:
2026-06-25 16:27:56 +02:00
parent cd076b3c02
commit 7675bf3bea
3 changed files with 53 additions and 15 deletions
+17
View File
@@ -394,6 +394,7 @@ try:
accumulator_delete_entries,
accumulator_list_entries,
accumulator_move_entry,
accumulator_save_entries,
)
from .prompt_builder import (
build_camera_config_json,
@@ -471,6 +472,7 @@ except ImportError:
accumulator_delete_entries,
accumulator_list_entries,
accumulator_move_entry,
accumulator_save_entries,
)
from prompt_builder import (
build_camera_config_json,
@@ -583,6 +585,21 @@ if PromptServer is not None and web is not None:
except Exception as exc:
return web.json_response({"error": str(exc)}, status=400)
@PromptServer.instance.routes.post("/sxcp/accumulator/save")
async def sxcp_accumulator_save(request):
try:
payload = await request.json()
result = accumulator_save_entries(
store_key=str(payload.get("store_key") or ""),
save_path=str(payload.get("save_path") or "sxcp_accumulator"),
filename_prefix=str(payload.get("filename_prefix") or "sxcp_accum"),
clear_after_save=bool(payload.get("clear_after_save")),
preview_limit=int(payload.get("preview_limit") or 0),
)
return web.json_response(result)
except Exception as exc:
return web.json_response({"error": str(exc)}, status=400)
@PromptServer.instance.routes.post("/sxcp/accumulator/move")
async def sxcp_accumulator_move(request):
try: