Skip to content

Commit 641e107

Browse files
authored
Update ModelCardViewModel.cs
1 parent 49573ee commit 641e107

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

StabilityMatrix.Avalonia/ViewModels/Inference/ModelCardViewModel.cs

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,48 @@ partial void OnSelectedModelChanged(HybridModelFile? value)
507507

508508
partial void OnSelectedUnetModelChanged(HybridModelFile? value) => OnSelectedModelChanged(value);
509509

510+
// ------------------------------------------------------------
511+
// Outpaint Model Recommendation Helpers
512+
// ------------------------------------------------------------
513+
private bool HasPoseCompletionBias(HybridModelFile model)
514+
{
515+
var name = (model.ShortDisplayName ?? model.RelativePath ?? string.Empty)
516+
.ToLowerInvariant();
517+
518+
string[] risky =
519+
[
520+
"realistic vision v6",
521+
"rv6",
522+
"v6.0",
523+
"hyper-inpaint",
524+
"inpainting",
525+
"b1"
526+
];
527+
528+
return risky.Any(name.Contains);
529+
}
530+
531+
private HybridModelFile? FindRecommendedOutpaintModel()
532+
{
533+
var rv51 = ClientManager.Models
534+
.FirstOrDefault(m =>
535+
(m.ShortDisplayName ?? m.RelativePath ?? string.Empty)
536+
.Contains("Realistic Vision V5.1", StringComparison.InvariantCultureIgnoreCase)
537+
);
538+
539+
if (rv51 is not null)
540+
return rv51;
541+
542+
var rv5 = ClientManager.Models
543+
.FirstOrDefault(m =>
544+
(m.ShortDisplayName ?? m.RelativePath ?? string.Empty)
545+
.Contains("Realistic Vision V5", StringComparison.InvariantCultureIgnoreCase)
546+
);
547+
548+
return rv5;
549+
}
550+
551+
510552
private void SetupStandaloneModelLoader(ModuleApplyStepEventArgs e)
511553
{
512554
if (SelectedModelLoader is ModelLoader.Unet && IsGguf)

0 commit comments

Comments
 (0)