mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-10-10 03:22:12 -03:00
feat(recipes): add 'Has Workflow' filter to the recipes filter panel
This commit is contained in:
@@ -308,6 +308,9 @@ class RecipeListingHandler:
|
||||
if lora_availability:
|
||||
filters["lora_availability"] = lora_availability
|
||||
|
||||
if request.query.get("has_workflow", "").lower() == "true":
|
||||
filters["has_workflow"] = True
|
||||
|
||||
lora_hash = request.query.get("lora_hash")
|
||||
checkpoint_hash = request.query.get("checkpoint_hash")
|
||||
|
||||
|
||||
@@ -3738,6 +3738,12 @@ class RecipeScanner:
|
||||
if self._compute_availability_statuses(item) & selected
|
||||
]
|
||||
|
||||
# Filter by embedded workflow presence
|
||||
if filters.get("has_workflow"):
|
||||
filtered_data = [
|
||||
item for item in filtered_data if item.get("has_workflow")
|
||||
]
|
||||
|
||||
# Apply sorting if not already handled by pre-sorted cache
|
||||
if ":" in sort_by or sort_field in ("loras_count", "random", "opened"):
|
||||
field, order = (sort_by.split(":") + ["desc"])[:2]
|
||||
|
||||
Reference in New Issue
Block a user