@@ -637,7 +637,8 @@ async def analyze_workflow(request):
637637 total = 0 ,
638638 )
639639
640- update_analysis_progress = lambda payload : self ._update_analysis_progress (analysis_id , payload )
640+ def update_analysis_progress (payload ):
641+ self ._update_analysis_progress (analysis_id , payload )
641642
642643 # Analyze and find matches
643644 result = await asyncio .to_thread (
@@ -1483,7 +1484,10 @@ async def metadata_build_start_route(request):
14831484 requested_worker_count = worker_count ,
14841485 )
14851486
1486- update_metadata_build_progress = lambda progress_payload : self ._update_metadata_build_progress (progress_id , progress_payload )
1487+ def update_metadata_build_progress (progress_payload ):
1488+ self ._update_metadata_build_progress (
1489+ progress_id , progress_payload
1490+ )
14871491
14881492 def is_metadata_build_cancelled ():
14891493 return self .metadata_builder_progress .is_cancelled (progress_id )
@@ -1602,7 +1606,8 @@ async def get_loaded_models(request):
16021606 {"error" : "Workflow JSON must be an object" }, status = 400
16031607 )
16041608
1605- update_loaded_progress = lambda * args , ** kwargs : self ._update_loaded_progress (loaded_id , * args , ** kwargs )
1609+ def update_loaded_progress (* args , ** kwargs ):
1610+ self ._update_loaded_progress (loaded_id , * args , ** kwargs )
16061611
16071612 def get_workflow_node_count ():
16081613 node_count = 0
@@ -1740,7 +1745,13 @@ def build_loaded_models_response():
17401745 total = workflow_node_count ,
17411746 )
17421747
1743- update_workflow_analysis_progress = lambda payload : self ._update_workflow_analysis_progress (loaded_id , workflow_node_count , interpolate_percent , payload )
1748+ def update_workflow_analysis_progress (payload ):
1749+ self ._update_workflow_analysis_progress (
1750+ loaded_id ,
1751+ workflow_node_count ,
1752+ interpolate_percent ,
1753+ payload ,
1754+ )
17441755
17451756 # Analyze workflow to get all model references
17461757 all_model_refs = analyze_workflow_models (
@@ -2170,9 +2181,7 @@ def result_hash_matches(result, *, require_filename=False):
21702181 result_hash = extract_result_sha256 (result )
21712182 if result_hash != provided_hash :
21722183 return False
2173- if require_filename and not result_filename_matches (result ):
2174- return False
2175- return True
2184+ return not require_filename or result_filename_matches (result )
21762185
21772186 def huggingface_page_url (result ):
21782187 try :
0 commit comments