deleteLoraWeights method
Removes LoRA weights from current model
Implementation
@override
Future<void> deleteLoraWeights() async {
await _ensureInitialized();
if (_currentActiveModel == null) {
throw Exception('No active model to remove LoRA weights from');
}
_loraPath = null;
final updatedSpec = InferenceModelSpec(
name: _currentActiveModel!.name,
modelUrl: _currentActiveModel!.modelUrl,
loraUrl: null, // Remove LoRA
replacePolicy: _currentActiveModel!.replacePolicy,
);
// Update internal state
_loraPaths.remove(updatedSpec.name);
_currentActiveModel = updatedSpec;
}