deleteLoraWeights method

  1. @override
Future<void> deleteLoraWeights()
override

Removes LoRA weights from current model

Implementation

@override
Future<void> deleteLoraWeights() async {
  await _ensureInitialized();

  if (_activeInferenceModel == null) {
    throw Exception('No active inference model to remove LoRA weights from');
  }

  final current = _activeInferenceModel as InferenceModelSpec;

  final updatedSpec = InferenceModelSpec(
    name: current.name,
    modelSource: current.modelSource,
    loraSource: null, // Remove LoRA
    replacePolicy: current.replacePolicy,
  );

  // Update active model (no manual _loraPaths management needed)
  setActiveModel(updatedSpec);
}