unsloth 2026.11.8
Agent skill executes caller supplied PythonRemote native stage fails open on manifest errors
SHA-25631dbe800eeee21723f28c8ab1ab798b7bfbcfbc6ce7b3fb753a5f227472dd2b7
Evidence
1---
2name: image-prompting
3description: Write detailed prompts for the loaded image or video model when the user asks to generate one.
4allowed-tools: generate_image generate_video
5---
6
7# Write an image or video prompt
8
9Use this skill when the user asks for an image or a video and their request is short or vague.
10
111. Read the generate_image or generate_video tool description: when it carries a tip for the model loaded in Unsloth Studio and that tip disagrees with a step below, follow the tip.
122. Name the subject first, with the details that must stay the same across shots.
133. Add the setting: place, time of day and weather.
144. Pick a style: photo, illustration, painting or 3D render, plus the lens or medium when it matters.
155. Describe the light and the mood.
⋯5 lines
1# SPDX-License-Identifier: AGPL-3.0-only
2# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
3
4"""Installs prebuilt audiocpp_server, checked with --help before swap; archives must match audio-
5cpp-prebuilt-sha256.json (uncovered refused); newest release unless UNSLOTH_AUDIO_CPP_TAG or
6--published-release-tag names one; a newer intact install is never replaced …
6:85… d lookup
7keeps the install."""
8
9from __future__ import annotations
10
11import argparse
12import datetime
13import errno
14import fnmatch
15import glob
16import hashlib
17import json
18import os
19import platform
20import re
21import shutil
22import subprocess
23import sys
24import time
25import tarfile
26import urllib.error
27import urllib.request
28import zipfile
29from concurrent.futures import ThreadPoolExecutor
30from pathlib import Path
31from typing import Optional, Sequence
32
33if __package__:
34 from . import prebuilt_core as core
35 from .install_sd_cpp_prebuilt import (
36 GitHubRateLimited,
37 _is_rate_limited,
38 _rate_limit_message,
39 _safe_extractall,
40 )
41else:
42 _STUDIO_DIR = os.path.dirname(os.path.abspath(__file__))
43 if _STUDIO_DIR not in sys.path:
44 sys.path.insert(0, _STUDIO_DIR)
45 import prebuilt_core as core # type: ignore[no-redef]
46 from install_sd_cpp_prebuilt import ( # type: ignore[no-redef]
47 GitHubRateLimited,
48 _is_rate_limited,
49 _rate_limit_message,
50 _safe_extractall,
51 )
52
53# The Unsloth fork publishes the bundles Studio installs (CI: .github/workflows/unsloth …
54:92… he Unsloth
55# packaging (static eSpeak-ng, lean multi-arch Linux CUDA) and a manifest + sha256 index per release.
56DEFAULT_REPO = "unslothai/audio.cpp"
57
58# What prebuilt_core's release lookup and index parsers read through _OPS.
59COMPONENT = "audio.cpp"
60MANIFEST_ASSET_NAME = "audio-cpp-prebuilt-manifest.json"
61SHA256_ASSET_NAME = "audio-cpp-prebuilt-sha256.json"
62
63INSTALL_RECORD = "UNSLOTH_AUDIO_CPP_PREBUILT_INFO.json"
64OWNERSHIP_MARKER …
79:82… the tree on disk."""
80
81
82def log(message: str) -> None:
83 print(f"audio.cpp: {message}", file = sys.stderr, flush = True)
84
85
86# Late-binding seam for prebuilt_core: its downloader and release lookup read USER_AGENT, log and the
87# asset names above from here, and see a test's monkeypatch of any core name set on this module.
88_OPS = core.ModuleOps(globals())
89
90_OS_TOKENS = {
91 "windows": ("windows", "win"),
92 "linux": ("ubuntu", "linux"),
93 "darwin": ("macos", "darwin"),
94}
95_ARCH_TOKENS = {
96 "x86_64": "x64",
97 "amd64": "x64",
98 "x64": "x64",
99 "arm64": "arm64",
100 "aarch64": "arm64",
101}
102# "-cuda12.8" (upstream) or "-cuda12" (unslothai/audio.cpp: one lean bundle per CUDA major line).
103_CUDA_LINE = re.compile(r"-cuda(\d+)(?:\.(\d+))?(?=[-.]|$)")
104
105
106def _repo() -> str:
107 return (os.environ.get("UNSLOTH_AUDIO_CPP_REPO") or "").strip() or DEFAULT_REPO
108
109
110def _pinned_tag() -> Optional[str]:
111 """``UNSLOTH_AUDIO_CPP_TAG``, …
Showing the top 5 files — 21 more files (187 regions) not shown.