File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
MaIN.InferPage/Components/Pages
MaIN.Services/Services/LLMService Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 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 }
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments