Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix(n1): geladenes LFM3 Audio gilt nicht als bildfaehig (in der Mac-App gemessen); kein Piper-Hinweis bei Vorlesen ueber LU Engine/extern

purplec6c2d3b8916a
diff --git a/src-tauri/src/commands/engine.rs b/src-tauri/src/commands/engine.rs
index a8797fb3..98dda990 100644
--- a/src-tauri/src/commands/engine.rs
+++ b/src-tauri/src/commands/engine.rs
@@ -4341,6 +4341,12 @@ fn note_image_part(state: &AppState, answer: &mut serde_json::Value, note: Optio
}
/// The image part a finished argv passes along, when it passes one.
+/// Whether a process started with these arguments can see a picture: it got
+/// a part, and that part is an image part (N1: LFM3 Audio's part only hears).
+pub(crate) fn started_seeing(args: &[String]) -> bool {
+ image_part_in(args).is_some_and(projector_sees_images)
+}
+
pub(crate) fn image_part_in(args: &[String]) -> Option<&str> {
let at = args.iter().position(|a| a == "--mmproj")?;
args.get(at + 1).map(String::as_str)
@@ -4925,7 +4931,7 @@ fn list_bundled_models_blocking(
let guard = state.bundled_engine.lock().unwrap();
(
guard.as_ref().map(|e| e.model_path.clone()),
- guard.as_ref().is_some_and(|e| image_part_in(&e.args).is_some()),
+ guard.as_ref().is_some_and(|e| started_seeing(&e.args)),
)
};
let dirs = bundled_scan_dirs(&dir, extra_dirs);
@@ -6741,6 +6747,22 @@ mod tests {
b
}
+ #[test]
+ fn a_loaded_audio_model_does_not_see_either() {
+ // Measured in the Mac app: LFM3-Audio loaded in the LU Engine was
+ // listed with vision=true, because the loaded model answered with
+ // "started with --mmproj".
+ let dir = tempfile::tempdir().unwrap();
+ let audio = dir.path().join("a.mmproj.gguf");
+ std::fs::write(&audio, projector_head(&[("clip.has_audio_encoder", true)])).unwrap();
+ let vision = dir.path().join("v.mmproj.gguf");
+ std::fs::write(&vision, projector_head(&[("clip.has_vision_encoder", true)])).unwrap();
+ let args = |p: &std::path::Path| vec!["-m".to_string(), "/m.gguf".into(), "--mmproj".into(), p.to_string_lossy().to_string()];
+ assert!(!started_seeing(&args(&audio)));
+ assert!(started_seeing(&args(&vision)));
+ assert!(!started_seeing(&["-m".to_string(), "/m.gguf".into()]));
+ }
+
#[test]
fn an_audio_projector_hears_and_does_not_see() {
// The flags of the three LFM3 projectors, read from the files on
diff --git a/src/components/settings/SpeechSettings.tsx b/src/components/settings/SpeechSettings.tsx
index 89388595..e53c6e41 100644
--- a/src/components/settings/SpeechSettings.tsx
+++ b/src/components/settings/SpeechSettings.tsx
@@ -362,7 +362,8 @@ export function SpeechSettings() {
{voiceSettings.ttsFallbackReason} If an antivirus quarantined Piper, whitelist it or reinstall the voice below.
</p>
)}
- {showsHint(tts) && (
+ {/* N1: Piper is only required when it is the engine that reads aloud. */}
+ {showsHint(tts) && voiceSettings.ttsMode === 'piper' && (
<p className="text-[0.55rem] text-gray-500 leading-snug">
Required for read-aloud. Installs Piper + a neural voice locally (~63 MB).
</p>
diff --git a/src/hooks/__tests__/lfm3-audio-spricht-und-hoert.dom.test.tsx b/src/hooks/__tests__/lfm3-audio-spricht-und-hoert.dom.test.tsx
index d3e66cf1..9726fa96 100644
--- a/src/hooks/__tests__/lfm3-audio-spricht-und-hoert.dom.test.tsx
+++ b/src/hooks/__tests__/lfm3-audio-spricht-und-hoert.dom.test.tsx
@@ -132,6 +132,7 @@ describe('Einstellungen: ein Klick traegt LFM3 Audio in Ollama ein', () => {
expect(useVoiceStore.getState()).toMatchObject({ sttMode: 'engine', ttsMode: 'engine' })
expect(screen.getAllByText(/LFM3 Audio or LFM3 Omni/).length).toBe(2)
expect(screen.queryByText(/Required for the microphone/)).toBeNull()
+ expect(screen.queryByText(/Required for read-aloud/)).toBeNull()
vi.unstubAllGlobals()
})