Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Thanks for helping improve the patch-bay for AI audio. This project is **Apache
## Before you open a PR

```bash
./scripts/install.sh # one-time (Python 3.11 venv + Studio deps)
./scripts/install.sh # one-time (Python 3.11/3.12 venv + Studio deps; DFN uses 3.11 sidecar)
```

Then run tests from the repo root:
Expand All @@ -27,7 +27,15 @@ PR CI never proves cold Real. On a Mac that matches the [README OS contract](REA
GROOVY_INFERENCE_STUB=0 uv run pytest tests/test_cold_machine_hero.py -q -m integration
```

Expect **0 failed and 0 skipped**. Then smoke one featured template in the studio: **Render** → play the **cached** preview (patch-bay audition, not live inference).
Expect **0 failed and 0 skipped** (includes `test_dfn_whisper_cofile_cold_machine_gate` — DFN sidecar + Whisper on the same project).

Multi-model runtime isolation PRs also keep these CI-safe gates green:

```bash
uv run pytest tests/test_runtime_isolation_gates.py tests/test_runtime_isolation.py -q
```

Then smoke one featured template in the studio: **Render** → play the **cached** preview (patch-bay audition, not live inference).

Optional for maintainer weekly notes: Settings → **Copy clean-machine report** (privacy-safe snapshot) and paste into your lab log.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ Experimental. APIs and UI will change. Expect rough edges on clean machines and

## OS compatibility

Use **Python 3.11**, keep Inference on **Real** for demos, and install models via **Cmd+K** / Model Browser when prompted. Some models need CUDA or other hardware; Mac CPU/MPS may be slow or unsupported depending on the backend.
Use **Python 3.11 or 3.12** for the studio `.venv`. DeepFilterNet installs into a **Python 3.11 sidecar** via Model Browser (do not recreate `.venv` just for denoise). Keep Inference on **Real** for demos, and install models via **Cmd+K** / Model Browser when prompted. Some models need CUDA or other hardware; Mac CPU/MPS may be slow or unsupported depending on the backend.

**macOS (Apple Silicon) contract for Real / cold-machine work:**

Expand Down Expand Up @@ -249,7 +249,7 @@ Also:
- **ffmpeg** on `PATH` for Video mux / PreviewVideo
- Install template models from Model Browser before the first real **Render**
- If the platform below (or CUDA where noted) is missing, use Settings → Inference → **Stub** for UI-only demos
- On failure, check ports `8188` / `5173`, disk space, Python **3.11**, and `HF_TOKEN` in Compliance / Settings for gated weights
- On failure, check ports `8188` / `5173`, disk space, Python **3.11+**, DeepFilterNet runtime install (sidecar), and `HF_TOKEN` in Compliance / Settings for gated weights
- Step on Apple Silicon needs `uv` on `PATH`; later runs reuse `.groovy/models/step-audio-editx/`

| Template | Model | Platform | First-run expectation |
Expand Down
11 changes: 7 additions & 4 deletions apps/studio/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1134,11 +1134,14 @@ export default function App() {
const missing = await findMissingWorkflowModels(workflow);
if (missing.length > 0) {
const label = missing.map((entry) => entry.name || entry.modelId).join(", ");
const needsRuntime = missing.some((entry) => entry.reason === "inference_not_ready");
const needsFamilyRuntime = missing.some((entry) => entry.reason === "runtime_missing");
const needsInferenceSetup = missing.some((entry) => entry.reason === "inference_not_ready");
setStatus(
needsRuntime
? `Inference setup required: ${label} — reinstall from Model Browser (Cmd+K)`
: `Install required: ${label} — use Model Browser (Cmd+K)`,
needsFamilyRuntime
? `Install AI runtime for ${label} — Model Browser (Cmd+K)`
: needsInferenceSetup
? `Inference setup required: ${label} — Model Browser (Cmd+K)`
: `Install required: ${label} — use Model Browser (Cmd+K)`,
);
openModelBrowser({
mode: "search",
Expand Down
7 changes: 6 additions & 1 deletion apps/studio/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -914,11 +914,16 @@ export async function findMissingWorkflowModels(
reason: "not_installed",
});
} else if (!card.dev_stub && card.inference_ready === false) {
const runtimeId =
typeof card.runtime_id === "string" ? card.runtime_id : undefined;
// Only provisionable sidecars (DFN today) use Install-runtime CTA.
// ACE/Step stay inference_not_ready until their provision story matches.
const needsFamilyRuntime = runtimeId === "R-py311-dfn";
missing.push({
modelId,
status: card.install_status,
name: card.name,
reason: "inference_not_ready",
reason: needsFamilyRuntime ? "runtime_missing" : "inference_not_ready",
});
}
} catch {
Expand Down
34 changes: 28 additions & 6 deletions apps/studio/src/components/ModelBrowser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ function modelNeedsReinstall(model: ModelCard): boolean {
return model.install_status === "ready" && !model.dev_stub && model.inference_ready === false;
}

/** Sidecars provisioned via Model Browser Install (not studio pip). */
function modelNeedsRuntimeInstall(model: ModelCard): boolean {
return modelNeedsReinstall(model) && model.runtime_id === "R-py311-dfn";
}

function hostFromCapabilities(machine: {
ram_available_gb: number | null;
vram_available_gb: number | null;
Expand Down Expand Up @@ -678,7 +683,10 @@ export default function ModelBrowser({
};

const runPlanAction = (action: AgentPlanAction) => {
if (action.type === "install_model" && action.model_id) {
if (
(action.type === "install_model" || action.type === "install_runtime") &&
action.model_id
) {
void handleInstall(action.model_id);
return;
}
Expand All @@ -698,13 +706,16 @@ export default function ModelBrowser({
agentPlan?.actions.filter(
(action) =>
action.type === "install_model" ||
action.type === "install_runtime" ||
action.type === "drop_node" ||
action.type === "suggest_public_model",
) ?? [],
[agentPlan],
);
const planInstallActions = useMemo(() => {
const installs = planModelActions.filter((action) => action.type === "install_model");
const installs = planModelActions.filter(
(action) => action.type === "install_model" || action.type === "install_runtime",
);
const filtered = installs.filter((action) =>
matchesComputePreset(action.model?.compute_resolved, computePreset),
);
Expand Down Expand Up @@ -824,14 +835,17 @@ export default function ModelBrowser({
}

if (needsSetup) {
const setupLabel = modelNeedsRuntimeInstall(model)
? "Install AI runtime"
: "Reinstall / fix setup";
return isInstalling ? (
<button type="button" onClick={() => handleCancelInstall(model.id)}>
Cancel install
</button>
) : (
<>
<button type="button" onClick={() => void handleInstall(model.id)}>
Reinstall / fix setup
{setupLabel}
</button>
{removeButton}
</>
Expand Down Expand Up @@ -1137,7 +1151,9 @@ export default function ModelBrowser({
</ul>
<div className="model-card__actions">
<button type="button" onClick={() => void handleInstall(failedModelId)}>
Retry install
{recovery.action === "install_runtime"
? "Retry Install AI runtime"
: "Retry install"}
</button>
{recovery.error ? (
<button type="button" onClick={() => setShowInstallLogs((value) => !value)}>
Expand All @@ -1161,7 +1177,9 @@ export default function ModelBrowser({
{recovery.similar_models.map((model) => (
<div key={model.id} className="model-browser__similar-item">
<button type="button" onClick={() => void handleInstall(model.id)}>
Install {model.name}
{model.runtime_id === "R-py311-dfn"
? `Install AI runtime · ${model.name}`
: `Install ${model.name}`}
</button>
{model.similar_rationale ? (
<span className="model-browser__hint">{model.similar_rationale}</span>
Expand Down Expand Up @@ -1485,7 +1503,11 @@ export default function ModelBrowser({
{model.dev_stub && !isDraftModel(model) ? <span className="pill pill--neutral">stub</span> : null}
{isDraftModel(model) ? <span className="pill pill--warning">pending review</span> : null}
{model.inference_ready === false && model.install_status === "ready" ? (
<span className="pill pill--warning">runtime missing</span>
<span className="pill pill--warning">
{model.runtime_id === "R-py311-dfn"
? "AI runtime missing"
: "inference not ready"}
</span>
) : null}
</div>
{compatibleNodes.length > 0 ? (
Expand Down
7 changes: 6 additions & 1 deletion apps/studio/src/components/ProvenanceVisualizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@ function modelLabel(model: {
registry_id?: string;
role?: string;
lora_scale?: number;
runtime_id?: string;
}): string {
const id = model.registry_id ?? "unknown";
if (model.role === "adapter") {
const scale = typeof model.lora_scale === "number" ? ` ×${model.lora_scale}` : "";
return `LoRA: ${id}${scale}`;
}
return `Model: ${id}`;
const runtime =
typeof model.runtime_id === "string" && model.runtime_id.trim()
? ` · ${model.runtime_id.trim()}`
: "";
return `Model: ${id}${runtime}`;
}

export default function ProvenanceVisualizer({ entry }: Props) {
Expand Down
19 changes: 17 additions & 2 deletions apps/studio/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ export type ModelCard = {
install_progress?: number;
install_error?: string | null;
dev_stub?: boolean;
/** Family worker id (R-…); distinct from compute.runtimes device tags. */
runtime_id?: string | null;
inference_ready?: boolean;
install_complete?: boolean;
inference_params?: InferenceParamSpec[];
Expand Down Expand Up @@ -450,7 +452,12 @@ export type ProvenanceLineageNode = {
content_hash?: string;
node?: { node_id?: string; node_type?: string };
contribution?: { class?: string; disclosure_label?: string };
models?: Array<{ registry_id?: string; role?: string; lora_scale?: number }>;
models?: Array<{
registry_id?: string;
role?: string;
lora_scale?: number;
runtime_id?: string;
}>;
record_hash?: string;
};

Expand All @@ -467,7 +474,12 @@ export type ProvenanceEntry = {
cache_id?: string;
contribution?: { class?: string; disclosure_label?: string };
node?: { node_id?: string; node_type?: string };
models?: Array<{ registry_id?: string; role?: string; lora_scale?: number }>;
models?: Array<{
registry_id?: string;
role?: string;
lora_scale?: number;
runtime_id?: string;
}>;
}>;
/** Full branching DAG when available (from cache provenance records). */
lineage?: ProvenanceLineage;
Expand All @@ -490,6 +502,7 @@ export type ModelRecommendation = {
export type AgentPlanAction = {
type:
| "install_model"
| "install_runtime"
| "drop_node"
| "apply_template"
| "propose_workflow"
Expand Down Expand Up @@ -561,6 +574,8 @@ export type InstallRecovery = {
explain?: string;
similar_models: Array<ModelCard & { similar_rationale?: string }>;
suggested_fixes: string[];
/** HITL vocabulary: install_runtime (sidecar) vs install_model (studio env). */
action?: "install_runtime" | "install_model" | string;
};

export type JobState = {
Expand Down
Loading
Loading