File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4343 <controls : Card Padding =" 12" >
4444 <StackPanel Spacing =" 0" >
4545 <!-- Model Row -->
46- <Grid ColumnDefinitions =" 60 ,*,Auto" >
46+ <Grid ColumnDefinitions =" 90 ,*,Auto" >
4747 <TextBlock
4848 Grid.Column=" 0"
4949 VerticalAlignment =" Center"
Original file line number Diff line number Diff line change @@ -724,22 +724,17 @@ private IReadOnlyList<HybridModelFile> GetWorkflowFilteredModels()
724724 if ( SelectedWorkflowProfile is InferenceWorkflowProfile . Auto or InferenceWorkflowProfile . Custom )
725725 return allModels ;
726726
727- var filteredModels = allModels
727+ var compatibleModels = allModels
728728 . Where ( model => IsModelCompatibleWithWorkflow ( model , SelectedWorkflowProfile ) )
729- . ToList ( ) ;
729+ . ToHashSet ( HybridModelFile . Comparer ) ;
730730
731- if ( filteredModels . Count == 0 )
731+ if ( compatibleModels . Count == 0 )
732732 return allModels ;
733733
734- if (
735- SelectedUnifiedModel is { } selected
736- && filteredModels . All ( model => ! HybridModelFile . Comparer . Equals ( model , selected ) )
737- )
738- {
739- filteredModels . Insert ( 0 , selected ) ;
740- }
741-
742- return filteredModels ;
734+ return allModels
735+ . OrderBy ( model => compatibleModels . Contains ( model ) ? 0 : 1 )
736+ . ThenBy ( model => model . ShortDisplayName , StringComparer . OrdinalIgnoreCase )
737+ . ToList ( ) ;
743738 }
744739
745740 private static bool IsModelCompatibleWithWorkflow ( HybridModelFile model , InferenceWorkflowProfile profile )
You can’t perform that action at this time.
0 commit comments