Skip to content

Commit a4082a9

Browse files
committed
Minor changes to satisfy rebase.
1 parent c173f1a commit a4082a9

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/MaIN.InferPage/Components/Pages/Home.razor

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,13 +386,16 @@
386386
// Cloud model — pick the right generic type based on capabilities
387387
bool vision = Utils.Vision;
388388
bool reasoning = Utils.Reason;
389+
bool imageGen = Utils.ImageGen;
389390

390391
if (vision && reasoning)
391392
return new GenericCloudVisionReasoningModel(Id: Utils.Model, Backend: Utils.BackendType);
392393
if (vision)
393394
return new GenericCloudVisionModel(Id: Utils.Model, Backend: Utils.BackendType);
394395
if (reasoning)
395396
return new GenericCloudReasoningModel(Id: Utils.Model, Backend: Utils.BackendType);
397+
if (imageGen)
398+
return new GenericImageGenerationCloudModel(Id: Utils.Model, Backend: Utils.BackendType);
396399

397400
return new GenericCloudModel(Id: Utils.Model, Backend: Utils.BackendType);
398401
}

src/MaIN.Services/Services/LLMService/LLMService.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -550,11 +550,7 @@ private static BaseSamplingPipeline CreateSampler(InferenceParams interferencePa
550550

551551
private static LocalModel GetLocalModel(Chat chat)
552552
{
553-
// 1. Use stored model instance if available
554-
if (chat.ModelInstance is LocalModel storedLocal)
555-
return storedLocal;
556-
557-
// 2. Try registry lookup (TryGetById to avoid throwing for unregistered models)
553+
// Try registry lookup (TryGetById to avoid throwing for unregistered models)
558554
if (ModelRegistry.TryGetById(chat.ModelId, out var model) && model is LocalModel localModel)
559555
return localModel;
560556

0 commit comments

Comments
 (0)