Enhance LoraStackerMapper and WorkflowParser functionality

- Updated LoraStackerMapper to handle multiple formats for lora_stack input, improving flexibility in processing existing stacks.
- Introduced caching for processed node results in WorkflowParser to optimize performance and prevent redundant processing.
- Added a new method to collect loras from model inputs, enhancing the ability to extract relevant data from the workflow.
- Improved handling of processed nodes to avoid cycles and ensure accurate results during workflow parsing.
This commit is contained in:
Will Miao
2025-03-23 07:41:55 +08:00
parent 6aa2342be1
commit 8690a8f11a
3 changed files with 69 additions and 16 deletions

View File

@@ -777,8 +777,6 @@ class RecipeRoutes:
# Parse the workflow to extract generation parameters and loras
parsed_workflow = self.parser.parse_workflow(workflow_json)
logger.debug(f"Parsed workflow: {parsed_workflow}")
if not parsed_workflow or not parsed_workflow.get("gen_params"):
return web.json_response({"error": "Could not extract generation parameters from workflow"}, status=400)