Save accumulator without rerunning workflow
This commit is contained in:
+17
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user