@wildshard/sdk 0.0.0 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GUIDE.md +790 -0
- package/README.md +14 -4
- package/bin/wildshard.mjs +38 -0
- package/lint/declaration-config.d.mts +2 -0
- package/lint/declaration-config.mjs +19 -0
- package/lint/engine-plugin.d.mts +2 -0
- package/lint/engine-plugin.mjs +40 -0
- package/lint/host-callbacks.d.mts +6 -0
- package/lint/host-callbacks.mjs +123 -0
- package/lint/host-files.d.mts +1 -0
- package/lint/host-files.mjs +7 -0
- package/lint/layer-exports.d.mts +2 -0
- package/lint/layer-exports.mjs +21 -0
- package/lint/legacy-line-basis.json +995 -0
- package/lint/nine-tiling-baseline.json +35 -0
- package/lint/ratchet.json +11 -0
- package/lint/runtime-files.d.mts +12 -0
- package/lint/runtime-files.json +16 -0
- package/lint/runtime-files.mjs +69 -0
- package/lint/runtime-performance.d.mts +6 -0
- package/lint/runtime-performance.mjs +184 -0
- package/lint/sdk-plugin.d.mts +4 -0
- package/lint/sdk-plugin.mjs +134 -0
- package/lint/shardfile-boundaries.d.mts +10 -0
- package/lint/shardfile-boundaries.mjs +122 -0
- package/lint/tile-bake-debt.json +556 -0
- package/package.json +371 -4
- package/scripts/agent-parity.mjs +1524 -0
- package/scripts/agent-sync.mjs +518 -0
- package/scripts/apfs-clone.mjs +67 -0
- package/scripts/assert-store-layout.mjs +23 -0
- package/scripts/astc6-phone-cap.d.mts +3 -0
- package/scripts/astc6-phone-cap.mjs +137 -0
- package/scripts/audit-assets.d.mts +10 -0
- package/scripts/audit-assets.mjs +151 -0
- package/scripts/bake/coatFiles.d.mts +6 -0
- package/scripts/bake/coatFiles.mjs +37 -0
- package/scripts/bake/environment.d.mts +2 -0
- package/scripts/bake/environment.mjs +58 -0
- package/scripts/bake/far-proxies.mjs +45 -0
- package/scripts/bake/keyed-sky.d.mts +4 -0
- package/scripts/bake/keyed-sky.mjs +34 -0
- package/scripts/bake/movers.mjs +56 -0
- package/scripts/bake/nativeWorld.d.mts +6 -0
- package/scripts/bake/nativeWorld.mjs +43 -0
- package/scripts/bake/navmeshGround.ts +22 -0
- package/scripts/bake/near-placeholder.mjs +331 -0
- package/scripts/bake/placeholderShards.mjs +41 -0
- package/scripts/bake/skins.mjs +15 -0
- package/scripts/bake/template-skins.mjs +33 -0
- package/scripts/bake/viewmodelBytes.ts +26 -0
- package/scripts/bake/viewmodelPage.ts +11 -0
- package/scripts/bake/worldHost.d.mts +35 -0
- package/scripts/bake/worldHost.mjs +110 -0
- package/scripts/bake-astc6.cache.json +80 -0
- package/scripts/bake-astc6.far-reach.cache.json +23 -0
- package/scripts/bake-astc6.list.json +111 -0
- package/scripts/bake-astc6.mjs +279 -0
- package/scripts/bake-astc6.nalati-grasslands.cache.json +42 -0
- package/scripts/bake-catalogue.mjs +44 -0
- package/scripts/bake-check.mjs +54 -0
- package/scripts/bake-chunk.mjs +124 -0
- package/scripts/bake-cloud-field.mjs +24 -0
- package/scripts/bake-coats.mjs +110 -0
- package/scripts/bake-data-maps.d.mts +24 -0
- package/scripts/bake-data-maps.mjs +72 -0
- package/scripts/bake-entry-programs.mjs +117 -0
- package/scripts/bake-geometry.mjs +106 -0
- package/scripts/bake-hybrid-tiles.mjs +28 -0
- package/scripts/bake-ktx2.cache.json +276 -0
- package/scripts/bake-ktx2.list.json +365 -0
- package/scripts/bake-ktx2.mjs +477 -0
- package/scripts/bake-map-glb.mjs +127 -0
- package/scripts/bake-map-rest.d.mts +7 -0
- package/scripts/bake-map-rest.mjs +50 -0
- package/scripts/bake-maps.mjs +200 -0
- package/scripts/bake-navmesh.mjs +259 -0
- package/scripts/bake-packs.mjs +129 -0
- package/scripts/bake-pickups.mjs +102 -0
- package/scripts/bake-query-terrain.mjs +64 -0
- package/scripts/bake-recurve-pool.mjs +16 -0
- package/scripts/bake-section-schemas.d.mts +3 -0
- package/scripts/bake-template-shardfile.mjs +32 -0
- package/scripts/bake-textures.mjs +80 -0
- package/scripts/bake-viewmodel-sets.json +45 -0
- package/scripts/bake-viewmodel-sets.mjs +137 -0
- package/scripts/bake-voxel-ao.mjs +119 -0
- package/scripts/bake-water-ripples.mjs +25 -0
- package/scripts/blender/README.md +129 -0
- package/scripts/blender/build.sh +166 -0
- package/scripts/blender/lib/export-scene.mjs +129 -0
- package/scripts/blender/lib/glb-digest.mjs +188 -0
- package/scripts/blender/lib/glb.py +68 -0
- package/scripts/blender/lib/save_blend.py +17 -0
- package/scripts/blender/lib/world_fixture.py +55 -0
- package/scripts/blender/targets.json +591 -0
- package/scripts/build-sdk.mjs +95 -0
- package/scripts/build-shardfiles.d.mts +7 -0
- package/scripts/build-shardfiles.mjs +206 -0
- package/scripts/capture-hero.mjs +137 -0
- package/scripts/check-lift-review.mjs +23 -0
- package/scripts/chromium-keychain-check.mjs +139 -0
- package/scripts/chromium-keychain.d.mts +1 -0
- package/scripts/chromium-keychain.mjs +5 -0
- package/scripts/compile-script.d.mts +3 -0
- package/scripts/compile-script.mjs +8 -0
- package/scripts/creature-color.mjs +255 -0
- package/scripts/decide/calibrate.py +127 -0
- package/scripts/decide/calibration/2026-10-03/labels-s1.tsv +281 -0
- package/scripts/decide/calibration/2026-10-03/labels-s2.tsv +97 -0
- package/scripts/decide/calibration/2026-10-03/labels-s3.tsv +48 -0
- package/scripts/decide/calibration/2026-10-03/labels-s3b.tsv +26 -0
- package/scripts/decide/calibration/2026-10-03/res-capture-status-v1.jsonl +376 -0
- package/scripts/decide/calibration/2026-10-03/res-text-garbled-strings.jsonl +48 -0
- package/scripts/decide/calibration/2026-10-03/res-text-garbled-v1.jsonl +73 -0
- package/scripts/decide/decide.py +262 -0
- package/scripts/decide/decide.sh +50 -0
- package/scripts/decide/layer-purity-pilot.mjs +41 -0
- package/scripts/decide/sets/capture-status.json +46 -0
- package/scripts/decide/sets/layer-purity.json +28 -0
- package/scripts/decide/sets/text-garbled.json +17 -0
- package/scripts/decide/test_decide.py +37 -0
- package/scripts/docs.mjs +15 -0
- package/scripts/entry-reads/crawl.ts +152 -0
- package/scripts/entry-reads/tsconfig.json +25 -0
- package/scripts/gen-format-schema.d.mts +2 -0
- package/scripts/gen-format-schema.mjs +21 -0
- package/scripts/gen-host-catalogue.d.mts +14 -0
- package/scripts/gen-host-catalogue.mjs +108 -0
- package/scripts/gen-shard-layout-doc.d.mts +4 -0
- package/scripts/gen-shard-layout-doc.mjs +55 -0
- package/scripts/gen-shards.d.mts +17 -0
- package/scripts/gen-shards.mjs +311 -0
- package/scripts/goldens/capture-inputs.d.mts +4 -0
- package/scripts/goldens/capture-inputs.mjs +34 -0
- package/scripts/goldens/colour_shift.py +27 -0
- package/scripts/goldens/native-residency.d.mts +10 -0
- package/scripts/goldens/native-residency.mjs +104 -0
- package/scripts/goldens/plot-inputs.d.mts +12 -0
- package/scripts/goldens/plot-inputs.mjs +46 -0
- package/scripts/gpu-texmem.mjs +98 -0
- package/scripts/horizon-matte/config.py +24 -0
- package/scripts/horizon-matte/encode.py +91 -0
- package/scripts/horizon-matte/key.py +141 -0
- package/scripts/horizon-matte/mkjobs.py +33 -0
- package/scripts/horizon-matte/mkjobs_day2.py +11 -0
- package/scripts/horizon-matte/overlap.py +80 -0
- package/scripts/horizon-matte/run_codex.py +57 -0
- package/scripts/horizon-matte/stitch.py +133 -0
- package/scripts/img2mesh/CC0.md +105 -0
- package/scripts/img2mesh/README.md +209 -0
- package/scripts/img2mesh/ab_board.py +102 -0
- package/scripts/img2mesh/birds/birds.json +255 -0
- package/scripts/img2mesh/birds/birds_atlas.py +150 -0
- package/scripts/img2mesh/birds/birds_fix_preview.mjs +103 -0
- package/scripts/img2mesh/birds/birds_fix_render.py +75 -0
- package/scripts/img2mesh/birds/birds_pack.py +110 -0
- package/scripts/img2mesh/birds/birds_phone_b.py +112 -0
- package/scripts/img2mesh/birds/birds_post.py +550 -0
- package/scripts/img2mesh/birds/birds_render.py +125 -0
- package/scripts/img2mesh/birds/birds_sheet.py +33 -0
- package/scripts/img2mesh/birds/birds_view.py +60 -0
- package/scripts/img2mesh/board.py +100 -0
- package/scripts/img2mesh/build_cc0.sh +52 -0
- package/scripts/img2mesh/build_driftwood.sh +12 -0
- package/scripts/img2mesh/build_faces.sh +53 -0
- package/scripts/img2mesh/build_props.py +81 -0
- package/scripts/img2mesh/cc0_export.py +186 -0
- package/scripts/img2mesh/driftwood_post.py +571 -0
- package/scripts/img2mesh/e304_faces.sh +67 -0
- package/scripts/img2mesh/face_remaster.py +911 -0
- package/scripts/img2mesh/face_views.py +95 -0
- package/scripts/img2mesh/faces-e304.json +9 -0
- package/scripts/img2mesh/faces.json +30 -0
- package/scripts/img2mesh/head_cut.py +100 -0
- package/scripts/img2mesh/hi3d_paint.py +94 -0
- package/scripts/img2mesh/hi3d_refine.py +161 -0
- package/scripts/img2mesh/hunyuan_cpu_rasterizer.sh +42 -0
- package/scripts/img2mesh/pine_hollow_phone.sh +13 -0
- package/scripts/img2mesh/props/coral-arch.json +32 -0
- package/scripts/img2mesh/props/ember-furnace.json +30 -0
- package/scripts/img2mesh/props/night-market-gate.json +10 -0
- package/scripts/img2mesh/render_still.py +86 -0
- package/scripts/img2mesh/rig_strip.mjs +46 -0
- package/scripts/img2mesh/rig_transfer.mjs +104 -0
- package/scripts/img2mesh/split_sheet.py +48 -0
- package/scripts/img2mesh/trellis_batch.py +110 -0
- package/scripts/img2mesh/versus_board.py +114 -0
- package/scripts/import-bundle.d.mts +2 -0
- package/scripts/import-bundle.mjs +20 -0
- package/scripts/ktx2-ab-board.py +133 -0
- package/scripts/ktx2-ab.mjs +111 -0
- package/scripts/ktx2-settings.mjs +18 -0
- package/scripts/land.d.mts +14 -0
- package/scripts/land.mjs +809 -0
- package/scripts/lint-dispatch.mjs +14 -0
- package/scripts/map-bake-frames.d.mts +4 -0
- package/scripts/map-bake-frames.mjs +23 -0
- package/scripts/map-geometry.d.mts +9 -0
- package/scripts/map-geometry.mjs +29 -0
- package/scripts/map-world.mjs +162 -0
- package/scripts/mockup-local.sh +46 -0
- package/scripts/music/export-midi.mjs +68 -0
- package/scripts/music/gen/analyze.py +308 -0
- package/scripts/music/gen/audio_jobs.py +46 -0
- package/scripts/music/gen/briefs.json +51 -0
- package/scripts/music/gen/build_page.py +334 -0
- package/scripts/music/gen/folk.json +3187 -0
- package/scripts/music/gen/gen_ace_step.py +156 -0
- package/scripts/music/gen/gen_heartmula.py +187 -0
- package/scripts/music/gen/gen_minimax.py +143 -0
- package/scripts/music/gen/gen_sao.py +122 -0
- package/scripts/music/gen/gen_sao_small.py +104 -0
- package/scripts/music/gen/gen_sfx.py +98 -0
- package/scripts/music/gen/gen_sfx_ezaudio.py +112 -0
- package/scripts/music/gen/gen_sfx_moss.py +112 -0
- package/scripts/music/gen/models.json +61 -0
- package/scripts/music/gen/nalati-jobs.json +104 -0
- package/scripts/music/gen/nalati-score-build.json +119 -0
- package/scripts/music/gen/nalati-score.json +3448 -0
- package/scripts/music/gen/ob7-fit-decisions.json +38 -0
- package/scripts/music/gen/ob7-score-jobs.json +152 -0
- package/scripts/music/gen/ob7-sfx-jobs.json +897 -0
- package/scripts/music/gen/ob7_build.py +469 -0
- package/scripts/music/gen/ob7_generate.py +67 -0
- package/scripts/music/gen/ob7_run.sh +42 -0
- package/scripts/music/gen/orchestral.json +3187 -0
- package/scripts/music/gen/own_score.py +486 -0
- package/scripts/music/gen/ph-jobs.json +27 -0
- package/scripts/music/gen/ph_page.py +222 -0
- package/scripts/music/gen/piano.json +3175 -0
- package/scripts/music/gen/rank_v3.py +248 -0
- package/scripts/music/gen/sfx-best.json +2486 -0
- package/scripts/music/gen/sfx-ezaudio.json +4082 -0
- package/scripts/music/gen/sfx-jobs.json +57 -0
- package/scripts/music/gen/sfx-minimax-jobs.json +16 -0
- package/scripts/music/gen/sfx-minimax.json +289 -0
- package/scripts/music/gen/sfx-moss.json +4082 -0
- package/scripts/music/gen/sfx-nalati-b3-jobs.json +17 -0
- package/scripts/music/gen/sfx-nalati-jobs.json +338 -0
- package/scripts/music/gen/sfx-nalati.json +11202 -0
- package/scripts/music/gen/sfx-nd-jobs.json +57 -0
- package/scripts/music/gen/sfx-nd-moss.json +2097 -0
- package/scripts/music/gen/sfx-nd-sa3-medium.json +2097 -0
- package/scripts/music/gen/sfx-nd-summary.json +38 -0
- package/scripts/music/gen/sfx-peaks.json +7 -0
- package/scripts/music/gen/sfx-ph-jobs.json +169 -0
- package/scripts/music/gen/sfx-ph-moss.json +6564 -0
- package/scripts/music/gen/sfx-ph-sa3-medium.json +7239 -0
- package/scripts/music/gen/sfx-ph-summary.json +63 -0
- package/scripts/music/gen/sfx-sa3-medium.json +4082 -0
- package/scripts/music/gen/sfx-sa3.json +4082 -0
- package/scripts/music/gen/sfx-summary.json +107 -0
- package/scripts/music/gen/sfx_build.py +332 -0
- package/scripts/music/gen/sfx_merge.py +255 -0
- package/scripts/music/gen/sfx_minimax.py +61 -0
- package/scripts/music/gen/sfx_nalati.py +331 -0
- package/scripts/music/gen/sfx_sprite.py +424 -0
- package/scripts/music/gen/stems.py +539 -0
- package/scripts/music/gen/test_loop_meter.py +29 -0
- package/scripts/music/gen/test_ob7_provenance.py +77 -0
- package/scripts/music/gen/v3-folk-build.json +148 -0
- package/scripts/music/gen/v3-folk.json +1818 -0
- package/scripts/music/gen/v3-jobs.json +145 -0
- package/scripts/music/gen/v3-orchestral-build.json +148 -0
- package/scripts/music/gen/v3-orchestral.json +1813 -0
- package/scripts/music/gen/v3-ph-folk-build.json +94 -0
- package/scripts/music/gen/v3-ph-folk.json +1806 -0
- package/scripts/music/gen/v3-ph-orchestral-build.json +94 -0
- package/scripts/music/gen/v3-ph-orchestral.json +1824 -0
- package/scripts/music/gen/v3-ph-piano-build.json +94 -0
- package/scripts/music/gen/v3-ph-piano.json +1818 -0
- package/scripts/music/gen/v3-piano-build.json +148 -0
- package/scripts/music/gen/v3-piano.json +1813 -0
- package/scripts/music/wildshard-theme.mid +0 -0
- package/scripts/music/wildshard-trailer30.mid +0 -0
- package/scripts/named-blob-output.d.mts +8 -0
- package/scripts/named-blob-output.mjs +48 -0
- package/scripts/pack-all.mjs +15 -0
- package/scripts/pid-lock.d.mts +1 -0
- package/scripts/pid-lock.mjs +63 -0
- package/scripts/practice/bake_dummy.py +53 -0
- package/scripts/practice/build_dummies.sh +43 -0
- package/scripts/practice/dummy_parts.py +568 -0
- package/scripts/practice/dummy_rig_gate.py +139 -0
- package/scripts/practice/gate_sheet.py +36 -0
- package/scripts/practice/generate_dummy_unimate.py +132 -0
- package/scripts/practice/pack_dummy.mjs +59 -0
- package/scripts/practice/repair_dummy_weights.mjs +68 -0
- package/scripts/practice/rig_dummy.py +828 -0
- package/scripts/practice/verify_unimate_skin.mjs +356 -0
- package/scripts/preparation-seed.mjs +15 -0
- package/scripts/prepare-basis-tool.mjs +6 -0
- package/scripts/prepare-product.d.mts +14 -0
- package/scripts/prepare-product.mjs +101 -0
- package/scripts/product-build-tools.d.mts +3 -0
- package/scripts/product-build-tools.json +3 -0
- package/scripts/product-build-tools.mjs +31 -0
- package/scripts/publish-public.mjs +7 -0
- package/scripts/push-tables.d.mts +1 -0
- package/scripts/push-tables.mjs +28 -0
- package/scripts/record-shard-mounts.mjs +133 -0
- package/scripts/sdk-externals.d.mts +2 -0
- package/scripts/sdk-externals.mjs +2 -0
- package/scripts/section-inventory.ts +209 -0
- package/scripts/select-candidate.mjs +15 -0
- package/scripts/shard-build-pool.d.mts +4 -0
- package/scripts/shard-build-pool.mjs +53 -0
- package/scripts/shard-line-baseline.json +17 -0
- package/scripts/shard-milestones.d.mts +15 -0
- package/scripts/shard-milestones.mjs +105 -0
- package/scripts/shard-output-report.d.mts +9 -0
- package/scripts/shard-output-report.mjs +85 -0
- package/scripts/shard-platform-cli.mjs +93 -0
- package/scripts/shard-progress.mjs +212 -0
- package/scripts/shard-timelapse.py +102 -0
- package/scripts/shardfile-cold-boot.mjs +79 -0
- package/scripts/shardfile-vite.d.mts +4 -0
- package/scripts/shardfile-vite.mjs +20 -0
- package/scripts/simplify-models.mjs +24 -0
- package/scripts/site-facts.mjs +88 -0
- package/scripts/test-template-gate.mjs +44 -0
- package/scripts/test_golden_compare.py +68 -0
- package/scripts/tex-tiers.cache.json +181 -0
- package/scripts/tex-tiers.mjs +240 -0
- package/scripts/texmem-probe.mjs +184 -0
- package/scripts/unused-assets.mjs +173 -0
- package/scripts/vite-tmp.d.mts +23 -0
- package/scripts/vite-tmp.mjs +157 -0
- package/scripts/wave-line-baselines.json +32 -0
- package/scripts/wildshard.d.mts +4 -0
- package/scripts/wildshard.mjs +105 -0
- package/scripts/witness-checkpoints.d.mts +10 -0
- package/scripts/witness-checkpoints.mjs +84 -0
- package/scripts/witness-generation.d.mts +10 -0
- package/scripts/witness-generation.mjs +45 -0
- package/scripts/witness-manifests.d.mts +8 -0
- package/scripts/witness-manifests.mjs +157 -0
- package/scripts/worktree-ignore.d.mts +4 -0
- package/scripts/worktree-ignore.mjs +36 -0
- package/scripts/worktree-reap.mjs +214 -0
- package/scripts/worktree.mjs +396 -0
- package/scripts/worldclaw/capture-front.sh +28 -0
- package/scripts/worldclaw/design-template.md +62 -0
- package/scripts/worldclaw/spec-map.py +92 -0
- package/scripts/worldclaw/spec.ts +96 -0
- package/skills/wildshard/SKILL.md +50 -0
- package/skills/wildshard-goldens/SKILL.md +54 -0
- package/skills/wildshard-mockup-to-model/SKILL.md +56 -0
- package/skills/wildshard-upgrade/SKILL.md +46 -0
- package/src/.oxfmtrc.json +50 -0
- package/src/.oxlintrc.json +173 -0
- package/src/cli/account/account.ts +199 -0
- package/src/cli/account/command.ts +193 -0
- package/src/cli/account/key.ts +154 -0
- package/src/cli/args.ts +97 -0
- package/src/cli/audio/audio.ts +24 -0
- package/src/cli/bin.mjs +8 -0
- package/src/cli/delete/delete.ts +258 -0
- package/src/cli/help.ts +196 -0
- package/src/cli/hero/adopt.ts +103 -0
- package/src/cli/hero/hero.ts +112 -0
- package/src/cli/hero/stamp.ts +298 -0
- package/src/cli/main.ts +292 -0
- package/src/cli/report.ts +16 -0
- package/src/cli/shardfile/command.ts +50 -0
- package/src/cli/shardfile/shardfile.ts +192 -0
- package/src/cli/upload/api.ts +246 -0
- package/src/cli/upload/compress.ts +55 -0
- package/src/cli/upload/hero.ts +62 -0
- package/src/cli/upload/placement.ts +115 -0
- package/src/cli/upload/provenance.ts +192 -0
- package/src/cli/upload/signature.ts +30 -0
- package/src/cli/upload/upload.ts +269 -0
- package/src/cli/upload/validate.ts +74 -0
- package/src/cli/upload/wire.ts +147 -0
- package/src/cli/version.ts +63 -0
- package/src/commons/bake/portableMath.ts +187 -0
- package/src/commons/catalogue.ts +10 -0
- package/src/commons/courseProgram.ts +32 -0
- package/src/commons/practiceCourse.ts +16 -0
- package/src/commons/scripts/abi.as +14 -0
- package/src/commons/scripts/bridge.as +14 -0
- package/src/commons/scripts/course.as +63 -0
- package/src/scripts/ask-new.sh +29 -0
- package/src/scripts/asks.mjs +141 -0
- package/src/scripts/herdr-prompt.sh +34 -0
- package/src/scripts/herdr-question-open.sh +67 -0
- package/src/scripts/md-wrap.mjs +229 -0
- package/src/server/app.ts +19 -0
- package/src/server/serve.ts +49 -0
- package/src/sharddev/admission.ts +7 -0
- package/src/sharddev/arenaView.ts +15 -0
- package/src/sharddev/as/groupBankV2.ts +36 -0
- package/src/sharddev/as/groupStepV2.ts +13 -0
- package/src/sharddev/as/ws.ts +30 -0
- package/src/sharddev/as/wsV2.ts +180 -0
- package/src/sharddev/assemblyscriptCompiler.d.mts +5 -0
- package/src/sharddev/assemblyscriptCompiler.mjs +14 -0
- package/src/sharddev/assetHandle.ts +84 -0
- package/src/sharddev/assetOwner.ts +70 -0
- package/src/sharddev/assetScope.ts +30 -0
- package/src/sharddev/assets.ts +21 -0
- package/src/sharddev/audio.ts +9 -0
- package/src/sharddev/audioEncode.ts +211 -0
- package/src/sharddev/author.ts +3 -0
- package/src/sharddev/authorError.ts +28 -0
- package/src/sharddev/authorManifest.ts +39 -0
- package/src/sharddev/bake/annulus.ts +19 -0
- package/src/sharddev/bake/assemblyscriptMemo.ts +76 -0
- package/src/sharddev/bake/assemblyscriptMemoPort.ts +4 -0
- package/src/sharddev/bake/authoredWorld.ts +201 -0
- package/src/sharddev/bake/basisEncoder.ts +95 -0
- package/src/sharddev/bake/basisGlb.ts +85 -0
- package/src/sharddev/bake/basisTool.ts +74 -0
- package/src/sharddev/bake/basisToolInputs.ts +476 -0
- package/src/sharddev/bake/byteCodec.ts +33 -0
- package/src/sharddev/bake/canvasAtlas.ts +406 -0
- package/src/sharddev/bake/coarseCopy.ts +59 -0
- package/src/sharddev/bake/colliders.ts +87 -0
- package/src/sharddev/bake/compactGlb.ts +224 -0
- package/src/sharddev/bake/compileScript.ts +119 -0
- package/src/sharddev/bake/compileScriptV2.ts +75 -0
- package/src/sharddev/bake/contactRows.ts +84 -0
- package/src/sharddev/bake/creaturePlacement.ts +117 -0
- package/src/sharddev/bake/export.ts +67 -0
- package/src/sharddev/bake/facetedGeometry.ts +379 -0
- package/src/sharddev/bake/farImpostor.ts +120 -0
- package/src/sharddev/bake/forest.ts +100 -0
- package/src/sharddev/bake/format-hook.mjs +2 -0
- package/src/sharddev/bake/generatorGlb.ts +23 -0
- package/src/sharddev/bake/geometryBounds.ts +77 -0
- package/src/sharddev/bake/geometryError.ts +48 -0
- package/src/sharddev/bake/glb.ts +355 -0
- package/src/sharddev/bake/glbCompression.ts +143 -0
- package/src/sharddev/bake/gltfSource.ts +59 -0
- package/src/sharddev/bake/groundMap.ts +142 -0
- package/src/sharddev/bake/image.ts +20 -0
- package/src/sharddev/bake/isleMap.ts +64 -0
- package/src/sharddev/bake/json.mjs +84 -0
- package/src/sharddev/bake/keyedSky.ts +47 -0
- package/src/sharddev/bake/keyedSkyMemo.ts +39 -0
- package/src/sharddev/bake/kinds.ts +137 -0
- package/src/sharddev/bake/lightSources.ts +31 -0
- package/src/sharddev/bake/mapAssembly.ts +84 -0
- package/src/sharddev/bake/mapRaster.ts +173 -0
- package/src/sharddev/bake/mapRest.ts +57 -0
- package/src/sharddev/bake/mapScenes.ts +234 -0
- package/src/sharddev/bake/materialGraph.ts +32 -0
- package/src/sharddev/bake/meadow.ts +27 -0
- package/src/sharddev/bake/meshoptChoiceMemo.ts +34 -0
- package/src/sharddev/bake/nativeInteractionFacts.ts +5 -0
- package/src/sharddev/bake/nativeLattice.ts +178 -0
- package/src/sharddev/bake/nativeRaster.ts +106 -0
- package/src/sharddev/bake/nativeTerrainField.ts +11 -0
- package/src/sharddev/bake/navigation-json.mjs +38 -0
- package/src/sharddev/bake/navigation.ts +113 -0
- package/src/sharddev/bake/navigationAsset.ts +18 -0
- package/src/sharddev/bake/nearPlaceholder.ts +206 -0
- package/src/sharddev/bake/normalizeRig.ts +80 -0
- package/src/sharddev/bake/phoneAstc.ts +93 -0
- package/src/sharddev/bake/placeholders.ts +581 -0
- package/src/sharddev/bake/placement.ts +80 -0
- package/src/sharddev/bake/portableBytes.ts +18 -0
- package/src/sharddev/bake/portableBytesMemo.ts +50 -0
- package/src/sharddev/bake/practiceCourse.ts +49 -0
- package/src/sharddev/bake/primitives.ts +96 -0
- package/src/sharddev/bake/props.ts +443 -0
- package/src/sharddev/bake/questPlacement.ts +98 -0
- package/src/sharddev/bake/rawTexture.ts +26 -0
- package/src/sharddev/bake/riderArms.ts +97 -0
- package/src/sharddev/bake/rig.ts +95 -0
- package/src/sharddev/bake/riggedHullRecipes.ts +40 -0
- package/src/sharddev/bake/signPlacements.ts +25 -0
- package/src/sharddev/bake/simplifier.ts +52 -0
- package/src/sharddev/bake/skinned.ts +312 -0
- package/src/sharddev/bake/slabChunks.ts +149 -0
- package/src/sharddev/bake/slabs.ts +263 -0
- package/src/sharddev/bake/source-loader.mjs +55 -0
- package/src/sharddev/bake/sourceMetadata.ts +54 -0
- package/src/sharddev/bake/species.ts +368 -0
- package/src/sharddev/bake/specimenCatalogue.ts +47 -0
- package/src/sharddev/bake/splatGround.ts +141 -0
- package/src/sharddev/bake/staticMaterials.ts +171 -0
- package/src/sharddev/bake/terrain.ts +195 -0
- package/src/sharddev/bake/texture.ts +33 -0
- package/src/sharddev/bake/textureWasm.ts +81 -0
- package/src/sharddev/bake/tileEncoder.ts +11 -0
- package/src/sharddev/bake/tileGrid.ts +62 -0
- package/src/sharddev/bake/v2Finite.ts +160 -0
- package/src/sharddev/bake/v2Fuel.ts +71 -0
- package/src/sharddev/bake/wholePartition.ts +74 -0
- package/src/sharddev/bake/wholePieceJoin.ts +147 -0
- package/src/sharddev/bake/world.ts +173 -0
- package/src/sharddev/bake/worldCollision.ts +128 -0
- package/src/sharddev/bake/worldGeometry.ts +237 -0
- package/src/sharddev/bake/worldGlb.ts +123 -0
- package/src/sharddev/bake/worldImage.ts +12 -0
- package/src/sharddev/bake/worldLod.ts +128 -0
- package/src/sharddev/bake/worldRows.ts +102 -0
- package/src/sharddev/bake/worldTextureMemo.ts +63 -0
- package/src/sharddev/bake/zstdBytesMemo.ts +52 -0
- package/src/sharddev/bake.ts +193 -0
- package/src/sharddev/bakePublication.ts +31 -0
- package/src/sharddev/behaviourSource.ts +94 -0
- package/src/sharddev/bin/wildshard.mjs +7 -0
- package/src/sharddev/blobBytes.ts +65 -0
- package/src/sharddev/blobs.ts +138 -0
- package/src/sharddev/bootInventory.ts +129 -0
- package/src/sharddev/bossProfiles.ts +18 -0
- package/src/sharddev/buildBehaviour.ts +77 -0
- package/src/sharddev/buildCacheMetrics.ts +17 -0
- package/src/sharddev/buildDecisionScripts.ts +122 -0
- package/src/sharddev/check.ts +117 -0
- package/src/sharddev/checkProject.ts +126 -0
- package/src/sharddev/cli.ts +191 -0
- package/src/sharddev/clientChannels.ts +169 -0
- package/src/sharddev/clientScripts.ts +10 -0
- package/src/sharddev/commons.ts +77 -0
- package/src/sharddev/commonsCosts.ts +11 -0
- package/src/sharddev/compileMovers.ts +11 -0
- package/src/sharddev/configBoundary.ts +6 -0
- package/src/sharddev/cookInput.ts +40 -0
- package/src/sharddev/crowds.ts +6 -0
- package/src/sharddev/decisionBindingMap.ts +11 -0
- package/src/sharddev/decisionScriptBindings.ts +117 -0
- package/src/sharddev/decisionScripts.ts +28 -0
- package/src/sharddev/decisionSource.ts +51 -0
- package/src/sharddev/dev.ts +113 -0
- package/src/sharddev/director.ts +26 -0
- package/src/sharddev/directorAbi.ts +77 -0
- package/src/sharddev/discoveryDocument.ts +97 -0
- package/src/sharddev/draft.ts +11 -0
- package/src/sharddev/eliteEntryRows.ts +29 -0
- package/src/sharddev/entries.ts +76 -0
- package/src/sharddev/entryReads.ts +73 -0
- package/src/sharddev/executeBundle.ts +55 -0
- package/src/sharddev/finds.ts +5 -0
- package/src/sharddev/formatJsonSchema.ts +3 -0
- package/src/sharddev/generationCache.ts +257 -0
- package/src/sharddev/generationRecipe.ts +94 -0
- package/src/sharddev/handwritten.ts +110 -0
- package/src/sharddev/immutable.ts +14 -0
- package/src/sharddev/interactions.ts +38 -0
- package/src/sharddev/kit/bakedGeometry.ts +16 -0
- package/src/sharddev/kit/geometryPack.ts +110 -0
- package/src/sharddev/ledger.ts +13 -0
- package/src/sharddev/looks/tileField.ts +67 -0
- package/src/sharddev/materialGraphFiles.ts +57 -0
- package/src/sharddev/materials.ts +574 -0
- package/src/sharddev/measure.ts +18 -0
- package/src/sharddev/modes.ts +115 -0
- package/src/sharddev/moverPrograms.ts +213 -0
- package/src/sharddev/movers.ts +75 -0
- package/src/sharddev/nativePopulationRows.ts +46 -0
- package/src/sharddev/newProject.ts +247 -0
- package/src/sharddev/noise.ts +54 -0
- package/src/sharddev/outputProduct.ts +188 -0
- package/src/sharddev/outputRuntime.ts +66 -0
- package/src/sharddev/performancePolicy.ts +18 -0
- package/src/sharddev/phasedBoss.ts +34 -0
- package/src/sharddev/physics.ts +194 -0
- package/src/sharddev/platformSections.ts +42 -0
- package/src/sharddev/plumbing.ts +8 -0
- package/src/sharddev/productOutput.ts +128 -0
- package/src/sharddev/project.ts +337 -0
- package/src/sharddev/projectCompilerIdentity.ts +94 -0
- package/src/sharddev/projectDecisions.ts +66 -0
- package/src/sharddev/projectEntryProof.ts +32 -0
- package/src/sharddev/projectGeneration.ts +219 -0
- package/src/sharddev/projectInputFiles.ts +47 -0
- package/src/sharddev/projectManifest.ts +108 -0
- package/src/sharddev/projectMap.ts +35 -0
- package/src/sharddev/projectOutput.ts +242 -0
- package/src/sharddev/projectPolicy.ts +17 -0
- package/src/sharddev/projectSections.ts +27 -0
- package/src/sharddev/questGraph.ts +25 -0
- package/src/sharddev/quests.ts +65 -0
- package/src/sharddev/random.ts +61 -0
- package/src/sharddev/refusals.ts +234 -0
- package/src/sharddev/reportCard.ts +13 -0
- package/src/sharddev/returnProjectionV2.ts +81 -0
- package/src/sharddev/rows.ts +192 -0
- package/src/sharddev/runtimeImports.ts +38 -0
- package/src/sharddev/runtimeMirrors.ts +39 -0
- package/src/sharddev/runtimePerformance.ts +38 -0
- package/src/sharddev/scene.ts +321 -0
- package/src/sharddev/sceneAnimation.ts +54 -0
- package/src/sharddev/sceneAudio.ts +64 -0
- package/src/sharddev/sceneDeclarations.ts +100 -0
- package/src/sharddev/sceneGraph.ts +139 -0
- package/src/sharddev/sceneTransform.ts +12 -0
- package/src/sharddev/schemaValidation.ts +61 -0
- package/src/sharddev/sections.ts +47 -0
- package/src/sharddev/shardSource.ts +59 -0
- package/src/sharddev/sourceReader.ts +26 -0
- package/src/sharddev/spawns.ts +38 -0
- package/src/sharddev/species/clips.ts +24 -0
- package/src/sharddev/species.ts +29 -0
- package/src/sharddev/speciesBrains.ts +19 -0
- package/src/sharddev/synth.ts +66 -0
- package/src/sharddev/test/compileDualScriptV2.ts +71 -0
- package/src/sharddev/test/compileSimV2.ts +21 -0
- package/src/sharddev/test/diskScriptScenario.ts +86 -0
- package/src/sharddev/test/scriptScenario.ts +249 -0
- package/src/sharddev/test/scriptSource.ts +12 -0
- package/src/sharddev/version.ts +4 -0
- package/src/sharddev/weapons/bowProfile.ts +20 -0
- package/src/sharddev/weapons/firearmRows.ts +11 -0
- package/src/sharddev/weapons/meleeProfile.ts +71 -0
- package/src/sharddev/weapons/thrownProfile.ts +10 -0
- package/src/sharddev/worldScenes.ts +308 -0
- package/src/sharddev/worldSource.ts +82 -0
- package/src/shards/_template/README.md +78 -0
- package/src/shards/_template/assets/2bf489fdb15f1734ddb4c4f32d500ec6da85c765ec7a4eb28dc6781160e7ec8c +0 -0
- package/src/shards/_template/assets/97ec4d8f75f5fa6239ee919444d6dc19fd35896bb305930c1f050ac6e0e0e6a6 +1 -0
- package/src/shards/_template/assets/a6a587a31327f936b1b04c05ade818c73fc8964260918662db43539465e27586 +0 -0
- package/src/shards/_template/assets/b4fbde0422e125b498c3dc8b9a5cc2516c8598f09e9d0e5f6b639b32f98179e6 +0 -0
- package/src/shards/_template/assets/bfa4dfc9c18979f904557ee8deab0058b8a399be10266f5fb1578b403f482fd4 +1 -0
- package/src/shards/_template/assets/ef3b7ff4fd22715771cb7d68a3977a903c5e7c3dc293542687d04b3ef3ace2cb +0 -0
- package/src/shards/_template/assets/f2db05998615ce1cb79ea96be32c168842eb6a2b34ec01feb86d36404603ee54 +0 -0
- package/src/shards/_template/assets/fef98ebb7fce6f66b26e78ac699e5c90f9bdcfaf8cabeb2b58125347eea8b4ab +0 -0
- package/src/shards/_template/behaviour/boss.as +39 -0
- package/src/shards/_template/behaviour/door.as +32 -0
- package/src/shards/_template/behaviour/hooks.json +129 -0
- package/src/shards/_template/behaviour/idle.as +75 -0
- package/src/shards/_template/behaviour/items.as +22 -0
- package/src/shards/_template/card/landscape.jpg +0 -0
- package/src/shards/_template/card/portrait.jpg +0 -0
- package/src/shards/_template/card/thumb.jpg +0 -0
- package/src/shards/_template/data/audio.json +45 -0
- package/src/shards/_template/data/bossDecision.json +83 -0
- package/src/shards/_template/data/budgets.json +70 -0
- package/src/shards/_template/data/card.json +281 -0
- package/src/shards/_template/data/clientScripts.json +987 -0
- package/src/shards/_template/data/creatures.json +65 -0
- package/src/shards/_template/data/director.json +39 -0
- package/src/shards/_template/data/encounters.json +96 -0
- package/src/shards/_template/data/items.json +172 -0
- package/src/shards/_template/data/layout.json +66 -0
- package/src/shards/_template/data/ledger.json +32 -0
- package/src/shards/_template/data/look.json +521 -0
- package/src/shards/_template/data/map.json +64 -0
- package/src/shards/_template/data/moves.json +16 -0
- package/src/shards/_template/data/placeholder.json +8 -0
- package/src/shards/_template/data/plumbing.json +32 -0
- package/src/shards/_template/data/quests.json +223 -0
- package/src/shards/_template/data/rows.json +423 -0
- package/src/shards/_template/data/skins.json +66 -0
- package/src/shards/_template/data/spawn.json +6 -0
- package/src/shards/_template/data/targets.json +150 -0
- package/src/shards/_template/data/text.json +12 -0
- package/src/shards/_template/data/ui.json +33 -0
- package/src/shards/_template/data/water.json +13 -0
- package/src/shards/_template/generators/behaviour.ts +34 -0
- package/src/shards/_template/generators/boss.ts +29 -0
- package/src/shards/_template/generators/buildOptions.ts +2 -0
- package/src/shards/_template/generators/cell.ts +224 -0
- package/src/shards/_template/generators/districts.ts +215 -0
- package/src/shards/_template/generators/farLook.ts +15 -0
- package/src/shards/_template/generators/generate.ts +27 -0
- package/src/shards/_template/generators/ground.ts +15 -0
- package/src/shards/_template/generators/kit.ts +69 -0
- package/src/shards/_template/generators/landscape.ts +59 -0
- package/src/shards/_template/generators/landscapeNoise.ts +62 -0
- package/src/shards/_template/generators/mapInputs.ts +10 -0
- package/src/shards/_template/generators/product.ts +100 -0
- package/src/shards/_template/generators/productOutput.ts +18 -0
- package/src/shards/_template/generators/props.ts +9 -0
- package/src/shards/_template/generators/templatePropsSource.ts +58 -0
- package/src/shards/_template/generators/terrain.ts +17 -0
- package/src/shards/_template/generators/world.ts +630 -0
- package/src/shards/_template/hero.json +10 -0
- package/src/shards/_template/look/entry-reads.json +20 -0
- package/src/shards/_template/manifest.json +281 -0
- package/src/shards/_template/shard.config.ts +10 -0
- package/src/shared/health.ts +10 -0
- package/src/tools/build-web.ts +59 -0
- package/src/tsconfig.json +30 -0
- package/src/web/app.tsx +53 -0
- package/src/web/index.html +12 -0
- package/src/web/main.tsx +10 -0
- package/src/web/tsconfig.json +13 -0
- package/tsconfig.author.json +23 -0
- package/tsconfig.commons.json +21 -0
- package/tsconfig.json +47 -0
- package/tsconfig.sharddev.json +20 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"""Stable Audio Open Small bake-off generator (stable-audio-tools on PyTorch MPS).
|
|
2
|
+
|
|
3
|
+
Runs in the stable-audio-tools checkout's venv, outside this repo:
|
|
4
|
+
|
|
5
|
+
cd ~/ml/music/stable-audio-tools/src
|
|
6
|
+
HF_HUB_OFFLINE=1 uv run --with soundfile --with pytorch_lightning==2.5.5 python <repo>/scripts/music/gen/gen_sao_small.py \
|
|
7
|
+
--styles piano,orchestral,folk --seeds 101,102 --out <scratch>/bakeoff-raw
|
|
8
|
+
|
|
9
|
+
SAO Small is a 341M rectified-flow model with an ~11.9 s window (sample_size 524288 @ 44.1 kHz):
|
|
10
|
+
it makes loops and one-shots, not a 60-90 s theme. Takes here are 11 s.
|
|
11
|
+
Weights: ~/projects/weights/manual/joeriben/stable-audio-open-small (ungated mirror of the gated
|
|
12
|
+
stabilityai/stable-audio-open-small) + manual/google-t5/t5-base, passed to the T5 conditioner as a
|
|
13
|
+
local model_path so nothing is fetched into an HF cache.
|
|
14
|
+
Licence: Stability AI Community License (free below USD 1M annual revenue; register for commercial
|
|
15
|
+
use; "Powered by Stability AI" attribution).
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from __future__ import annotations
|
|
19
|
+
|
|
20
|
+
import argparse
|
|
21
|
+
import json
|
|
22
|
+
import os
|
|
23
|
+
import subprocess
|
|
24
|
+
import time
|
|
25
|
+
from pathlib import Path
|
|
26
|
+
|
|
27
|
+
HERE = Path(__file__).resolve().parent
|
|
28
|
+
W = Path.home() / "projects/weights/manual"
|
|
29
|
+
SMALL = Path(os.environ.get("SAO_SMALL_WEIGHTS", W / "joeriben/stable-audio-open-small"))
|
|
30
|
+
T5 = Path(os.environ.get("T5_BASE_WEIGHTS", W / "google-t5/t5-base"))
|
|
31
|
+
SAT_ROOT = Path.home() / "ml/music/stable-audio-tools/src"
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def main() -> None:
|
|
35
|
+
ap = argparse.ArgumentParser()
|
|
36
|
+
ap.add_argument("--styles", default="piano,orchestral,folk")
|
|
37
|
+
ap.add_argument("--seeds", default="101")
|
|
38
|
+
ap.add_argument("--seconds", type=float, default=11.0)
|
|
39
|
+
ap.add_argument("--steps", type=int, default=8)
|
|
40
|
+
ap.add_argument("--cfg", type=float, default=1.0)
|
|
41
|
+
ap.add_argument("--tag", default="sao-small")
|
|
42
|
+
ap.add_argument("--out", required=True)
|
|
43
|
+
args = ap.parse_args()
|
|
44
|
+
|
|
45
|
+
import soundfile as sf
|
|
46
|
+
import torch
|
|
47
|
+
from stable_audio_tools.inference.generation import generate_diffusion_cond
|
|
48
|
+
from stable_audio_tools.models.factory import create_model_from_config
|
|
49
|
+
from stable_audio_tools.models.utils import load_ckpt_state_dict
|
|
50
|
+
|
|
51
|
+
dev = "mps" if torch.backends.mps.is_available() else "cpu"
|
|
52
|
+
cfg = json.loads((SMALL / "model_config.json").read_text())
|
|
53
|
+
for c in cfg["model"]["conditioning"]["configs"]:
|
|
54
|
+
if c["type"] == "t5":
|
|
55
|
+
c["config"]["model_path"] = str(T5)
|
|
56
|
+
t0 = time.time()
|
|
57
|
+
model = create_model_from_config(cfg)
|
|
58
|
+
model.load_state_dict(load_ckpt_state_dict(str(SMALL / "model.safetensors")))
|
|
59
|
+
model = model.to(dev).eval()
|
|
60
|
+
load_s = round(time.time() - t0, 1)
|
|
61
|
+
sr = cfg["sample_rate"]
|
|
62
|
+
print(f"[gen_sao_small] loaded on {dev} in {load_s}s", flush=True)
|
|
63
|
+
rev = subprocess.run(["git", "-C", str(SAT_ROOT), "rev-parse", "HEAD"], capture_output=True, text=True).stdout.strip()
|
|
64
|
+
|
|
65
|
+
briefs = json.loads((HERE / "briefs.json").read_text())
|
|
66
|
+
for style in args.styles.split(","):
|
|
67
|
+
s = briefs["styles"][style]
|
|
68
|
+
for seed in [int(x) for x in args.seeds.split(",")]:
|
|
69
|
+
dest = Path(args.out) / style / f"{args.tag}-{seed}.wav"
|
|
70
|
+
if dest.exists():
|
|
71
|
+
print(f"[gen_sao_small] have {dest}", flush=True)
|
|
72
|
+
continue
|
|
73
|
+
dest.parent.mkdir(parents=True, exist_ok=True)
|
|
74
|
+
t1 = time.time()
|
|
75
|
+
with torch.no_grad():
|
|
76
|
+
out = generate_diffusion_cond(
|
|
77
|
+
model, steps=args.steps, cfg_scale=args.cfg,
|
|
78
|
+
conditioning=[{"prompt": s["sao_prompt"], "seconds_total": args.seconds}],
|
|
79
|
+
sample_size=cfg["sample_size"], sample_rate=sr, seed=seed, device=dev,
|
|
80
|
+
)
|
|
81
|
+
wav = out[0].float().clamp(-1, 1).cpu().numpy().T[: int(args.seconds * sr)]
|
|
82
|
+
sf.write(str(dest), wav, sr)
|
|
83
|
+
dt = round(time.time() - t1, 1)
|
|
84
|
+
side = {
|
|
85
|
+
"model": "Stable Audio Open Small",
|
|
86
|
+
"variant": "stable-audio-open-small (mirror joeriben/stable-audio-open-small)",
|
|
87
|
+
"code_commit": f"stable-audio-tools {rev}, torch {torch.__version__}",
|
|
88
|
+
"backend": f"PyTorch {dev}",
|
|
89
|
+
"style": style,
|
|
90
|
+
"seed": seed,
|
|
91
|
+
"prompt": s["sao_prompt"],
|
|
92
|
+
"duration_s": args.seconds,
|
|
93
|
+
"steps": args.steps,
|
|
94
|
+
"cfg": args.cfg,
|
|
95
|
+
"gen_time_s": dt,
|
|
96
|
+
"model_load_s": load_s,
|
|
97
|
+
"mps_driver_gb": round(torch.mps.driver_allocated_memory() / 1e9, 2) if dev == "mps" else None,
|
|
98
|
+
}
|
|
99
|
+
dest.with_suffix(".json").write_text(json.dumps(side, indent=2))
|
|
100
|
+
print(f"[gen_sao_small] {style} seed={seed} {dt}s -> {dest}", flush=True)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
if __name__ == "__main__":
|
|
104
|
+
main()
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"""MUSIC.md v3 row 6 (E33): render every sound effect family with Stable Audio 3 (small-sfx or medium).
|
|
2
|
+
|
|
3
|
+
Runs in the stable-audio-3 checkout's venv (github.com/Stability-AI/stable-audio-3, MIT), outside this repo:
|
|
4
|
+
|
|
5
|
+
cd ~/ml/music/sfx/stable-audio-3
|
|
6
|
+
HF_HUB_OFFLINE=1 uv run python <repo>/scripts/music/gen/gen_sfx.py --model small-sfx --seeds 1,2,3 --out <scratch>/sfx-raw
|
|
7
|
+
|
|
8
|
+
Writes <out>/<model>/<family>/<seed>.wav + .json (prompt, seed, steps, timing). Families: scripts/music/gen/sfx-jobs.json.
|
|
9
|
+
Weights come from the weight store (~/projects/weights/manual/cocktailpeanut/stable-audio-3-*, ungated mirrors of the
|
|
10
|
+
gated stabilityai repos); the T5Gemma text encoder inside each repo is passed as a local `model_path`, so nothing is
|
|
11
|
+
fetched. Device: mps (PyTorch; SA3 has no MLX path in mlx-audio 0.5.5), fp32 (the library turns half off off-CUDA).
|
|
12
|
+
Licence: Stability AI Community (free below USD 1M revenue, register for commercial use, "Powered by Stability AI")
|
|
13
|
+
plus the Gemma terms for the bundled T5Gemma encoder.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
import argparse
|
|
19
|
+
import json
|
|
20
|
+
import os
|
|
21
|
+
import subprocess
|
|
22
|
+
import time
|
|
23
|
+
from pathlib import Path
|
|
24
|
+
|
|
25
|
+
HERE = Path(__file__).resolve().parent
|
|
26
|
+
W = Path.home() / "projects/weights/manual/cocktailpeanut"
|
|
27
|
+
REPOS = {"small-sfx": W / "stable-audio-3-small-sfx", "medium": W / "stable-audio-3-medium"}
|
|
28
|
+
SA3 = Path.home() / "ml/music/sfx/stable-audio-3"
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def main() -> None:
|
|
32
|
+
ap = argparse.ArgumentParser()
|
|
33
|
+
ap.add_argument("--model", choices=list(REPOS), required=True)
|
|
34
|
+
ap.add_argument("--seeds", default="1,2,3")
|
|
35
|
+
ap.add_argument("--families", default="", help="comma list (default: all)")
|
|
36
|
+
ap.add_argument("--steps", type=int, default=8)
|
|
37
|
+
ap.add_argument("--cfg", type=float, default=1.0)
|
|
38
|
+
ap.add_argument("--out", required=True)
|
|
39
|
+
ap.add_argument("--jobs", default="sfx-jobs.json", help="families file in this folder (sfx-ph-jobs.json: Pine Hollow)")
|
|
40
|
+
args = ap.parse_args()
|
|
41
|
+
|
|
42
|
+
import soundfile as sf
|
|
43
|
+
import torch
|
|
44
|
+
from stable_audio_3.loading_utils import load_diffusion_cond
|
|
45
|
+
from stable_audio_3.model import StableAudioModel
|
|
46
|
+
|
|
47
|
+
repo = REPOS[args.model]
|
|
48
|
+
cfg = json.loads((repo / "model_config.json").read_text())
|
|
49
|
+
|
|
50
|
+
def patch(node: object) -> None: # point every T5Gemma conditioner at the repo's local copy
|
|
51
|
+
if isinstance(node, dict):
|
|
52
|
+
if node.get("type") == "t5gemma" and isinstance(node.get("config"), dict):
|
|
53
|
+
c = node["config"]
|
|
54
|
+
c["model_path"] = str(repo / c.pop("subfolder", "t5gemma-b-b-ul2"))
|
|
55
|
+
c.pop("repo_id", None)
|
|
56
|
+
for v in node.values():
|
|
57
|
+
patch(v)
|
|
58
|
+
elif isinstance(node, list):
|
|
59
|
+
for v in node:
|
|
60
|
+
patch(v)
|
|
61
|
+
|
|
62
|
+
patch(cfg)
|
|
63
|
+
dev = "mps" if torch.backends.mps.is_available() else "cpu"
|
|
64
|
+
t0 = time.time()
|
|
65
|
+
net = load_diffusion_cond(cfg, str(repo / "model.safetensors"), device=dev, model_half=False)
|
|
66
|
+
net.use_lora, net.lora_names = False, []
|
|
67
|
+
model = StableAudioModel(net, cfg, dev, False)
|
|
68
|
+
load_s = round(time.time() - t0, 1)
|
|
69
|
+
sr = cfg["sample_rate"]
|
|
70
|
+
rev = subprocess.run(["git", "-C", str(SA3), "rev-parse", "HEAD"], capture_output=True, text=True).stdout.strip()
|
|
71
|
+
print(f"[gen_sfx] {args.model} loaded on {dev} in {load_s}s", flush=True)
|
|
72
|
+
|
|
73
|
+
fams = json.loads((HERE / args.jobs).read_text())["families"]
|
|
74
|
+
want = [f for f in args.families.split(",") if f] or list(fams)
|
|
75
|
+
for fam in want:
|
|
76
|
+
j = fams[fam]
|
|
77
|
+
for seed in [int(s) for s in args.seeds.split(",")]:
|
|
78
|
+
dest = Path(args.out) / args.model / fam / f"{seed}.wav"
|
|
79
|
+
if dest.exists():
|
|
80
|
+
continue
|
|
81
|
+
dest.parent.mkdir(parents=True, exist_ok=True)
|
|
82
|
+
t1 = time.time()
|
|
83
|
+
audio = model.generate(prompt=j["prompt"], duration=j["duration"], steps=args.steps, cfg_scale=args.cfg, seed=seed)
|
|
84
|
+
wav = audio[0].float().cpu().numpy().T if audio.dim() == 3 else audio.float().cpu().numpy().T
|
|
85
|
+
sf.write(str(dest), wav, sr)
|
|
86
|
+
dt = round(time.time() - t1, 2)
|
|
87
|
+
side = {"model": f"Stable Audio 3 {args.model}", "repo": f"stabilityai/stable-audio-3-{args.model} (mirror {repo.name})",
|
|
88
|
+
"code_commit": f"stable-audio-3 {rev}, torch {torch.__version__}", "backend": f"PyTorch {dev} fp32",
|
|
89
|
+
"family": fam, "kind": j["kind"], "seed": seed, "prompt": j["prompt"], "desc": j["desc"],
|
|
90
|
+
"duration_s": j["duration"], "steps": args.steps, "cfg": args.cfg, "gen_time_s": dt, "model_load_s": load_s,
|
|
91
|
+
"mps_driver_gb": round(torch.mps.driver_allocated_memory() / 1e9, 2) if dev == "mps" else None}
|
|
92
|
+
dest.with_suffix(".json").write_text(json.dumps(side, indent=2))
|
|
93
|
+
print(f"[gen_sfx] {args.model} {fam} seed={seed} {dt}s", flush=True)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
if __name__ == "__main__":
|
|
97
|
+
os.environ.setdefault("HF_HUB_OFFLINE", "1")
|
|
98
|
+
main()
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"""SFX round 2 (E33): render every sound-effect family with EzAudio-XL (OpenSound/EzAudio, MIT; text-to-audio).
|
|
2
|
+
|
|
3
|
+
Runs in the EzAudio checkout's venv, outside this repo:
|
|
4
|
+
|
|
5
|
+
cd ~/ml/music/sfx/EzAudio
|
|
6
|
+
HF_HUB_OFFLINE=1 PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.5 .venv/bin/python \
|
|
7
|
+
<repo>/scripts/music/gen/gen_sfx_ezaudio.py --seeds 1,2,3 --out <scratch>/sfx-raw
|
|
8
|
+
|
|
9
|
+
Writes <out>/ezaudio/<family>/<seed>.wav + .json (same layout as gen_sfx.py). 24 kHz mono, at most 10 s per
|
|
10
|
+
generation (its training length), so beds are 10 s takes looped. Weights from the store: the s3_xl DiT + VAE from
|
|
11
|
+
manual/OpenSound/EzAudio, the text encoder from manual/google/flan-t5-xl (loaded bf16 - the encoder only, ~2.4 GB).
|
|
12
|
+
Memory discipline as gen_sfx_moss.py: batch 1, bf16 text encoder, MPS high-watermark 0.5, pause between takes
|
|
13
|
+
while pressure is not normal (~/ml/music/mem-ok2.sh).
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
import argparse
|
|
19
|
+
import json
|
|
20
|
+
import os
|
|
21
|
+
import subprocess
|
|
22
|
+
import sys
|
|
23
|
+
import time
|
|
24
|
+
from pathlib import Path
|
|
25
|
+
|
|
26
|
+
HERE = Path(__file__).resolve().parent
|
|
27
|
+
W = Path.home() / "projects/weights/manual"
|
|
28
|
+
EZ = Path.home() / "ml/music/sfx/EzAudio"
|
|
29
|
+
GATE = Path.home() / "ml/music/mem-ok2.sh"
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def wait_for_memory() -> None:
|
|
33
|
+
env = {**os.environ, "EXCLUDE_PID": str(os.getpid())} # the gate must not count this process against itself
|
|
34
|
+
while subprocess.run(["bash", str(GATE)], capture_output=True, env=env).returncode != 0:
|
|
35
|
+
print("[gen_sfx_ezaudio] memory busy - waiting 2 min", flush=True)
|
|
36
|
+
time.sleep(120)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def main() -> None:
|
|
40
|
+
ap = argparse.ArgumentParser()
|
|
41
|
+
ap.add_argument("--seeds", default="1,2,3")
|
|
42
|
+
ap.add_argument("--families", default="")
|
|
43
|
+
ap.add_argument("--steps", type=int, default=100)
|
|
44
|
+
ap.add_argument("--cfg", type=float, default=5.0)
|
|
45
|
+
ap.add_argument("--out", required=True)
|
|
46
|
+
args = ap.parse_args()
|
|
47
|
+
|
|
48
|
+
os.chdir(EZ)
|
|
49
|
+
sys.path.insert(0, str(EZ))
|
|
50
|
+
import soundfile as sf
|
|
51
|
+
import torch
|
|
52
|
+
import transformers
|
|
53
|
+
from src.models.conditioners import MaskDiT
|
|
54
|
+
from src.modules.autoencoder_wrapper import Autoencoder
|
|
55
|
+
from src.utils import load_yaml_with_includes
|
|
56
|
+
from diffusers import DDIMScheduler
|
|
57
|
+
from api import ezaudio as ez
|
|
58
|
+
|
|
59
|
+
dev = "mps" if torch.backends.mps.is_available() else "cpu"
|
|
60
|
+
t0 = time.time()
|
|
61
|
+
params = load_yaml_with_includes(str(W / "OpenSound/EzAudio/ckpts/ezaudio-xl.yml"))
|
|
62
|
+
ae = Autoencoder(ckpt_path=str(W / "OpenSound/EzAudio/ckpts/vae/1m.pt"), model_type=params["autoencoder"]["name"],
|
|
63
|
+
quantization_first=params["autoencoder"]["q_first"]).to(dev).eval()
|
|
64
|
+
t5 = str(W / "google/flan-t5-xl")
|
|
65
|
+
tok = transformers.T5Tokenizer.from_pretrained(t5)
|
|
66
|
+
te = transformers.T5EncoderModel.from_pretrained(t5, torch_dtype=torch.bfloat16).to(dev).eval()
|
|
67
|
+
unet = MaskDiT(**params["model"]).to(dev)
|
|
68
|
+
unet.load_state_dict(torch.load(str(W / "OpenSound/EzAudio/ckpts/s3/ezaudio_s3_xl.pt"), map_location="cpu")["model"])
|
|
69
|
+
unet.eval()
|
|
70
|
+
sched = DDIMScheduler(**params["diff"])
|
|
71
|
+
model = ez.EzAudio.__new__(ez.EzAudio)
|
|
72
|
+
model.device, model.autoencoder, model.unet, model.tokenizer, model.text_encoder, model.noise_scheduler, model.params = \
|
|
73
|
+
dev, ae, unet, tok, te, sched, params
|
|
74
|
+
|
|
75
|
+
# the T5 encoder runs in bf16; hand the DiT fp32 context
|
|
76
|
+
orig = te.forward
|
|
77
|
+
|
|
78
|
+
def fwd(*a, **k):
|
|
79
|
+
out = orig(*a, **k)
|
|
80
|
+
out.last_hidden_state = out.last_hidden_state.float()
|
|
81
|
+
return out
|
|
82
|
+
|
|
83
|
+
te.forward = fwd
|
|
84
|
+
load_s = round(time.time() - t0, 1)
|
|
85
|
+
rev = subprocess.run(["git", "-C", str(EZ), "rev-parse", "--short", "HEAD"], capture_output=True, text=True).stdout.strip()
|
|
86
|
+
print(f"[gen_sfx_ezaudio] loaded on {dev} in {load_s}s", flush=True)
|
|
87
|
+
|
|
88
|
+
fams = json.loads((HERE / "sfx-jobs.json").read_text())["families"]
|
|
89
|
+
for fam in [f for f in args.families.split(",") if f] or list(fams):
|
|
90
|
+
j = fams[fam]
|
|
91
|
+
secs = int(min(max(round(float(j["duration"])), 1), 10))
|
|
92
|
+
for seed in [int(s) for s in args.seeds.split(",")]:
|
|
93
|
+
dest = Path(args.out) / "ezaudio" / fam / f"{seed}.wav"
|
|
94
|
+
if dest.exists():
|
|
95
|
+
continue
|
|
96
|
+
dest.parent.mkdir(parents=True, exist_ok=True)
|
|
97
|
+
wait_for_memory()
|
|
98
|
+
t1 = time.time()
|
|
99
|
+
sr, audio = model.generate_audio(j["prompt"], length=secs, guidance_scale=args.cfg, ddim_steps=args.steps, random_seed=seed)
|
|
100
|
+
sf.write(str(dest), audio, sr)
|
|
101
|
+
dt = round(time.time() - t1, 2)
|
|
102
|
+
side = {"model": "EzAudio-XL", "repo": "OpenSound/EzAudio (s3_xl) + google/flan-t5-xl",
|
|
103
|
+
"code_commit": f"EzAudio {rev}, torch {torch.__version__}", "backend": f"PyTorch {dev} (DiT fp32, T5 bf16)",
|
|
104
|
+
"family": fam, "kind": j["kind"], "seed": seed, "prompt": j["prompt"], "desc": j["desc"],
|
|
105
|
+
"duration_s": secs, "steps": args.steps, "cfg": args.cfg, "gen_time_s": dt, "model_load_s": load_s,
|
|
106
|
+
"mps_driver_gb": round(torch.mps.driver_allocated_memory() / 1e9, 2) if dev == "mps" else None}
|
|
107
|
+
dest.with_suffix(".json").write_text(json.dumps(side, indent=2))
|
|
108
|
+
print(f"[gen_sfx_ezaudio] {fam} seed={seed} {dt}s", flush=True)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
if __name__ == "__main__":
|
|
112
|
+
main()
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"""SFX round 2 (E33): render every sound-effect family with MOSS-SoundEffect v2.0 (OpenMOSS, Apache-2.0).
|
|
2
|
+
|
|
3
|
+
Runs in the MOSS-TTS checkout's venv, outside this repo:
|
|
4
|
+
|
|
5
|
+
cd ~/ml/music/sfx/MOSS-TTS/moss_soundeffect_v2
|
|
6
|
+
TORCHDYNAMO_DISABLE=1 PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.5 PYTORCH_MPS_LOW_WATERMARK_RATIO=0.4 .venv/bin/python \
|
|
7
|
+
<repo>/scripts/music/gen/gen_sfx_moss.py --seeds 1,2,3 --out <scratch>/sfx-raw
|
|
8
|
+
|
|
9
|
+
Writes <out>/moss/<family>/<seed>.wav + .json, the same layout as gen_sfx.py, so sfx_build.py ranks all models alike.
|
|
10
|
+
Weights: ~/projects/weights/manual/OpenMOSS-Team/MOSS-SoundEffect-v2.0 (a local diffusers-style dir: no hub calls).
|
|
11
|
+
Porting to Apple Silicon: the DiT forward is wrapped in torch.compile(triton cudagraphs) -> TORCHDYNAMO_DISABLE=1; the
|
|
12
|
+
timestep embedding is built in float64 on the device (MPS has none) -> patched to compute it on the CPU; the RoPE
|
|
13
|
+
tables are complex128 buffers -> patched to complex64;
|
|
14
|
+
device "mps", bf16 (the pipeline's own autocast); the other autocast("cuda") blocks just disable themselves.
|
|
15
|
+
Memory discipline (the user): batch 1, bf16, PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.5, and between takes the run
|
|
16
|
+
waits while macOS memory pressure is not normal or swap use is over 8 GB (~/ml/music/mem-ok2.sh).
|
|
17
|
+
The pipeline always denoises a fixed 30 s latent and crops, so a 1 s take costs as much as a 30 s one.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
from __future__ import annotations
|
|
21
|
+
|
|
22
|
+
import argparse
|
|
23
|
+
import json
|
|
24
|
+
import os
|
|
25
|
+
import subprocess
|
|
26
|
+
import time
|
|
27
|
+
from pathlib import Path
|
|
28
|
+
|
|
29
|
+
HERE = Path(__file__).resolve().parent
|
|
30
|
+
W = Path(os.environ.get("MOSS_WEIGHTS", Path.home() / "projects/weights/manual/OpenMOSS-Team/MOSS-SoundEffect-v2.0"))
|
|
31
|
+
MOSS = Path.home() / "ml/music/sfx/MOSS-TTS"
|
|
32
|
+
GATE = Path.home() / "ml/music/mem-ok2.sh"
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def wait_for_memory() -> None:
|
|
36
|
+
env = {**os.environ, "EXCLUDE_PID": str(os.getpid())} # the gate must not count this process against itself
|
|
37
|
+
while subprocess.run(["bash", str(GATE)], capture_output=True, env=env).returncode != 0:
|
|
38
|
+
print("[gen_sfx_moss] memory busy - waiting 2 min", flush=True)
|
|
39
|
+
time.sleep(120)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def main() -> None:
|
|
43
|
+
ap = argparse.ArgumentParser()
|
|
44
|
+
ap.add_argument("--seeds", default="1,2,3")
|
|
45
|
+
ap.add_argument("--families", default="")
|
|
46
|
+
ap.add_argument("--steps", type=int, default=100)
|
|
47
|
+
ap.add_argument("--cfg", type=float, default=4.0)
|
|
48
|
+
ap.add_argument("--out", required=True)
|
|
49
|
+
ap.add_argument("--jobs", default="sfx-jobs.json", help="families file in this folder (sfx-ph-jobs.json: Pine Hollow)")
|
|
50
|
+
args = ap.parse_args()
|
|
51
|
+
|
|
52
|
+
import soundfile as sf
|
|
53
|
+
import torch
|
|
54
|
+
from moss_soundeffect_v2 import MossSoundEffectPipeline # installed editable in the venv
|
|
55
|
+
from moss_soundeffect_v2.diffsynth.models import wan_audio_dit, wan_video_dit
|
|
56
|
+
from moss_soundeffect_v2.diffsynth.pipelines import wan_audio
|
|
57
|
+
|
|
58
|
+
# MPS has no float64: the timestep embedding is computed in float64 on the tensor's device. Same maths on the CPU.
|
|
59
|
+
def sinusoidal_embedding_1d(dim, position):
|
|
60
|
+
pos = position.detach().cpu().to(torch.float64)
|
|
61
|
+
sinusoid = torch.outer(pos, torch.pow(10000, -torch.arange(dim // 2, dtype=torch.float64).div(dim // 2)))
|
|
62
|
+
x = torch.cat([torch.cos(sinusoid), torch.sin(sinusoid)], dim=1)
|
|
63
|
+
return x.to(device=position.device, dtype=position.dtype)
|
|
64
|
+
|
|
65
|
+
wan_video_dit.sinusoidal_embedding_1d = sinusoidal_embedding_1d
|
|
66
|
+
wan_audio_dit.sinusoidal_embedding_1d = sinusoidal_embedding_1d
|
|
67
|
+
wan_audio.sinusoidal_embedding_1d = sinusoidal_embedding_1d # imported by name there
|
|
68
|
+
|
|
69
|
+
# the RoPE tables are complex128 buffers (polar of float64) - MPS has no complex128. Compute in float64 on the CPU
|
|
70
|
+
# and store complex64, which is what rope_apply reads anyway (.real / .imag cast to float32).
|
|
71
|
+
orig_freqs = wan_audio_dit.precompute_freqs_cis
|
|
72
|
+
|
|
73
|
+
def precompute_freqs_cis(*a, **k):
|
|
74
|
+
return orig_freqs(*a, **k).to(torch.complex64)
|
|
75
|
+
|
|
76
|
+
wan_audio_dit.precompute_freqs_cis = precompute_freqs_cis
|
|
77
|
+
wan_video_dit.precompute_freqs_cis = precompute_freqs_cis
|
|
78
|
+
|
|
79
|
+
dev = "mps" if torch.backends.mps.is_available() else "cpu"
|
|
80
|
+
t0 = time.time()
|
|
81
|
+
pipe = MossSoundEffectPipeline.from_pretrained(str(W), torch_dtype=torch.bfloat16, device=dev)
|
|
82
|
+
load_s = round(time.time() - t0, 1)
|
|
83
|
+
rev = subprocess.run(["git", "-C", str(MOSS), "rev-parse", "--short", "HEAD"], capture_output=True, text=True).stdout.strip()
|
|
84
|
+
print(f"[gen_sfx_moss] loaded on {dev} in {load_s}s", flush=True)
|
|
85
|
+
|
|
86
|
+
fams = json.loads((HERE / args.jobs).read_text())["families"]
|
|
87
|
+
for fam in [f for f in args.families.split(",") if f] or list(fams):
|
|
88
|
+
j = fams[fam]
|
|
89
|
+
secs = min(float(j["duration"]), 30.0)
|
|
90
|
+
for seed in [int(s) for s in args.seeds.split(",")]:
|
|
91
|
+
dest = Path(args.out) / "moss" / fam / f"{seed}.wav"
|
|
92
|
+
if dest.exists():
|
|
93
|
+
continue
|
|
94
|
+
dest.parent.mkdir(parents=True, exist_ok=True)
|
|
95
|
+
wait_for_memory()
|
|
96
|
+
t1 = time.time()
|
|
97
|
+
audio = pipe(prompt=j["prompt"], seconds=secs, num_inference_steps=args.steps, cfg_scale=args.cfg, seed=seed,
|
|
98
|
+
progress_bar_cmd=lambda x: x)
|
|
99
|
+
wav = audio[0].float().cpu().numpy().T
|
|
100
|
+
sf.write(str(dest), wav, pipe.sample_rate)
|
|
101
|
+
dt = round(time.time() - t1, 2)
|
|
102
|
+
side = {"model": "MOSS-SoundEffect v2.0", "repo": "OpenMOSS-Team/MOSS-SoundEffect-v2.0",
|
|
103
|
+
"code_commit": f"MOSS-TTS {rev}, torch {torch.__version__}", "backend": f"PyTorch {dev} bf16",
|
|
104
|
+
"family": fam, "kind": j["kind"], "seed": seed, "prompt": j["prompt"], "desc": j["desc"],
|
|
105
|
+
"duration_s": secs, "steps": args.steps, "cfg": args.cfg, "gen_time_s": dt, "model_load_s": load_s,
|
|
106
|
+
"mps_driver_gb": round(torch.mps.driver_allocated_memory() / 1e9, 2) if dev == "mps" else None}
|
|
107
|
+
dest.with_suffix(".json").write_text(json.dumps(side, indent=2))
|
|
108
|
+
print(f"[gen_sfx_moss] {fam} seed={seed} {dt}s", flush=True)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
if __name__ == "__main__":
|
|
112
|
+
main()
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_doc": "Per-model facts for the bake-off page (build_page.py). Measured on the M5 Max / 128 GB, 2026-09-22. Speed = wall time for one take incl. decode; memory = peak process RSS (/usr/bin/time -l) unless noted.",
|
|
3
|
+
"_exclude_prefixes": [
|
|
4
|
+
"smoke-"
|
|
5
|
+
],
|
|
6
|
+
"models": {
|
|
7
|
+
"HeartMuLa": {
|
|
8
|
+
"version": "HeartMuLa-RL-oss-3B-20260123 + HeartCodec-oss-20260123, heartlib-mlx 02dd2e2",
|
|
9
|
+
"status": "ran - 24 takes (first, spaced tag string; see briefs.json _heartmula_note)",
|
|
10
|
+
"backend": "MLX (heartlib-mlx port), LM bf16, codec fp32",
|
|
11
|
+
"speed": "75 s of audio in 165-242 s (avg 192 s): ~5 frames/s at 12.5 Hz, 0.4x real time",
|
|
12
|
+
"memory": "MLX peak 25.5 GB (incl. codec decode); ~12 GB RSS",
|
|
13
|
+
"licence": "Apache-2.0 (code and weights)",
|
|
14
|
+
"licence_short": "Apache-2.0"
|
|
15
|
+
},
|
|
16
|
+
"Stable Audio Open": {
|
|
17
|
+
"version": "stable-audio-open-1.0 (ungated mirror AEmotionStudio/stable-audio-open-models), diffusers StableAudioPipeline",
|
|
18
|
+
"status": "ran - 24 takes; capped at 47 s per generation",
|
|
19
|
+
"backend": "PyTorch MPS fp32 (no MLX port)",
|
|
20
|
+
"speed": "47 s clip in 64-94 s (avg 76 s), 100 steps, CFG 7",
|
|
21
|
+
"memory": "15.3 GB MPS driver",
|
|
22
|
+
"licence": "Stability AI Community License: free below USD 1M annual revenue; register with Stability for commercial use; 'Powered by Stability AI' attribution",
|
|
23
|
+
"licence_short": "Stability Community (<$1M)"
|
|
24
|
+
},
|
|
25
|
+
"Stable Audio Open Small": {
|
|
26
|
+
"version": "stable-audio-open-small (ungated mirror joeriben/stable-audio-open-small), stable-audio-tools 3241adb",
|
|
27
|
+
"status": "ran - 24 takes; ~11 s window, loops/one-shots only (never shortlisted as a theme)",
|
|
28
|
+
"backend": "PyTorch MPS",
|
|
29
|
+
"speed": "11 s clip in 0.4 s warm (7 s on the first call), 8 steps",
|
|
30
|
+
"memory": "3.5 GB MPS driver, 4.7 GB RSS",
|
|
31
|
+
"licence": "Stability AI Community License (as SAO 1.0)",
|
|
32
|
+
"licence_short": "Stability Community (<$1M)"
|
|
33
|
+
},
|
|
34
|
+
"MiniMax Music 3": {
|
|
35
|
+
"version": "MiniMaxAI/MiniMax-Music3, diffusers 0.40.0 ModularPipeline",
|
|
36
|
+
"status": "ran - 24 takes (the model card says CUDA-only; runs on MPS unchanged via diffusers 0.40)",
|
|
37
|
+
"backend": "PyTorch MPS bf16",
|
|
38
|
+
"speed": "75 s of audio in 151-318 s (avg 224 s), 30 steps",
|
|
39
|
+
"memory": "28.4 GB MPS driver, 10.3 GB RSS",
|
|
40
|
+
"licence": "MiniMax-Music3 Community License: commercial use OK, must show 'MiniMax-Music3' in the product UI, written authorisation above USD 20M yearly revenue",
|
|
41
|
+
"licence_short": "MiniMax Community (<$20M, UI credit)"
|
|
42
|
+
},
|
|
43
|
+
"ACE-Step 1.5": {
|
|
44
|
+
"version": "ace-step/ACE-Step-1.5 ca1e85f; turbo 2B + LM 1.7B and XL-SFT 4B were smoke-tested",
|
|
45
|
+
"status": "dropped by the user (too heavy for this machine) - not in the bake-off",
|
|
46
|
+
"backend": "MLX (DiT + 5 Hz LM + VAE)",
|
|
47
|
+
"speed": "60 s take: 31 s (turbo 2B + LM 1.7B), 84 s (XL-SFT, 50 steps, while another model ran)",
|
|
48
|
+
"memory": "15 GB RSS (turbo), 22 GB RSS (XL-SFT); MLX peak 28 GB",
|
|
49
|
+
"licence": "MIT (code and weights)",
|
|
50
|
+
"licence_short": "MIT"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"notes": [
|
|
54
|
+
"Speeds/memory measured on the M5 Max (128 GB), one model at a time, 2026-09-22.",
|
|
55
|
+
"Only MiniMax Music 3 and HeartMuLa write a full 60-90 s theme. Stable Audio Open 1.0 stops at 47 s (stitching or outpainting needed for a theme); SAO Small is loop/sting material.",
|
|
56
|
+
"Key/BPM control: none of the four holds the brief's D major / BPM reliably. SAO 1.0 hits the BPM most often (it reads 'N BPM' from the prompt); MiniMax mostly lands in G or C major regardless of the prompt; HeartMuLa has no tempo/key input at all.",
|
|
57
|
+
"Voices: HeartMuLa is a song model and hums/sings under many takes (demucs finds a voice-like stem in most); some MiniMax takes also sing despite '[Instrumental]' lyrics. Takes with >20% vocal-stem energy are kept off the shortlist.",
|
|
58
|
+
"ACE-Step 1.5 was set up and smoke-tested (MLX, MIT) but dropped by the user as too heavy for this machine, so it has no takes here.",
|
|
59
|
+
"Licences differ: HeartMuLa is Apache-2.0; Stable Audio Open needs Stability registration for commercial use and a 'Powered by Stability AI' credit (free under USD 1M revenue); MiniMax Music 3 needs 'MiniMax-Music3' shown in the game's UI (free under USD 20M revenue)."
|
|
60
|
+
]
|
|
61
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_doc": "NALATI-MERGE A3: the Nalati score (MiniMax Music 3). gen_minimax.py --jobs nalati-jobs.json --keys test/dombra,... renders into <out>/<group>-<name>/minimax3-<seed>.wav. Step 1 = the six-take instrument test (can MiniMax play a dombra, a kobyz, a sybyzgy, a throat-sung drone convincingly?); the score's slots are added under `nalati/*` after the verdict. One Kazakh-folk score whatever the music-style setting (the user, wave 5); the throat drone only in the night + boss cues (wave 6). The instrument test's verdict (by measurement): the sybyzgy and the throat drone come through; the dombra partly (a plucked attack, but CLAP hears a flute over it); the kobyz does NOT (MiniMax plays it plucked, like a kobza) — so the score prompts describe each instrument by its sound (a raspy BOWED horsehair fiddle, a strummed two-string lute, a breathy wooden flute) and keep the arrangements lean (the full-ensemble test drifted to an orchestra + 21 % voice).",
|
|
3
|
+
"lyrics": {
|
|
4
|
+
"loop": "[Intro]\n[Instrumental]\n[Instrumental]\n[Solo]\n[Instrumental]",
|
|
5
|
+
"title": "[Intro]\n[Instrumental]\n[Solo]\n[Instrumental]\n[Outro]",
|
|
6
|
+
"chant": "[Intro]\n[Chant]\nooo\nooo\n[Chant]\nooo\nooo\n[Outro]"
|
|
7
|
+
},
|
|
8
|
+
"jobs": {
|
|
9
|
+
"test/dombra": {
|
|
10
|
+
"style": "nalati",
|
|
11
|
+
"slot": "test-dombra",
|
|
12
|
+
"duration": 45,
|
|
13
|
+
"lyrics": "title",
|
|
14
|
+
"prompt": "Genre: Kazakh traditional folk, solo dombra kui. BPM: 120. Instrumental only, no vocals. A solo dombra - the two-string fretted Kazakh long-neck lute - played with fast strummed and plucked right-hand patterns, a galloping 6/8 horse-gait rhythm, open fifths on the drone string, the melody on the high string. Natural close recording in a felt yurt, no other instruments."
|
|
15
|
+
},
|
|
16
|
+
"test/kobyz": {
|
|
17
|
+
"style": "nalati",
|
|
18
|
+
"slot": "test-kobyz",
|
|
19
|
+
"duration": 45,
|
|
20
|
+
"lyrics": "title",
|
|
21
|
+
"prompt": "Genre: Kazakh traditional folk, solo qobyz. BPM: 70. Instrumental only, no vocals. A solo kyl-kobyz - the ancient two-string horsehair bowed fiddle of the Kazakh shamans - a raw, breathy, rasping bowed tone full of overtones, slow sliding melody over its own low drone, haunting and wild, like wind over the steppe. Natural close recording, no other instruments."
|
|
22
|
+
},
|
|
23
|
+
"test/sybyzgy": {
|
|
24
|
+
"style": "nalati",
|
|
25
|
+
"slot": "test-sybyzgy",
|
|
26
|
+
"duration": 45,
|
|
27
|
+
"lyrics": "title",
|
|
28
|
+
"prompt": "Genre: Kazakh traditional folk, solo sybyzgy. BPM: 80. Instrumental only, no vocals. A solo sybyzgy - the Kazakh open end-blown reed flute - an airy, breathy, wooden tone with a hummed throat drone under the melody, long free phrases with ornaments and slides, evoking a shepherd on a wide mountain pasture. Natural recording outdoors, no other instruments."
|
|
29
|
+
},
|
|
30
|
+
"test/throat": {
|
|
31
|
+
"style": "nalati",
|
|
32
|
+
"slot": "test-throat",
|
|
33
|
+
"duration": 45,
|
|
34
|
+
"lyrics": "chant",
|
|
35
|
+
"prompt": "Genre: Central Asian throat singing, overtone drone. BPM: 60. A single male throat singer (khoomei / kargyraa style) holding a deep growling drone with a whistling overtone melody above it, wordless, slow breaths between phrases, over a very soft low kobyz drone. Dark, ancient, night on the steppe. No drums, no other instruments."
|
|
36
|
+
},
|
|
37
|
+
"test/ensemble-day": {
|
|
38
|
+
"style": "nalati",
|
|
39
|
+
"slot": "test-ensemble-day",
|
|
40
|
+
"duration": 45,
|
|
41
|
+
"lyrics": "loop",
|
|
42
|
+
"prompt": "Genre: video game soundtrack, Kazakh folk ensemble. BPM: 112. Instrumental only, no vocals, no choir. An open-world adventure on the green Kazakh steppe of the Nalati grasslands. Arrangement: a strummed dombra ostinato in a galloping 6/8 horse-gait rhythm, a sybyzgy flute melody over it, a kobyz drone underneath, a jaw harp (shankobyz) twang and a frame drum (dauylpaz) keeping the gait. Wonder first, adventure second. No western orchestra, no piano, no guitar."
|
|
43
|
+
},
|
|
44
|
+
"test/ensemble-night": {
|
|
45
|
+
"style": "nalati",
|
|
46
|
+
"slot": "test-ensemble-night",
|
|
47
|
+
"duration": 45,
|
|
48
|
+
"lyrics": "chant",
|
|
49
|
+
"prompt": "Genre: video game soundtrack, Kazakh folk night theme. BPM: 66. The steppe at night under the stars in an open-world adventure game. Arrangement: a low wordless throat-sung drone (kargyraa) held under everything, a slow bowed kobyz melody, sparse plucked dombra notes, a soft frame drum like a distant heartbeat. Dark, calm, ancient, a little dangerous. No western orchestra, no piano, no guitar."
|
|
50
|
+
},
|
|
51
|
+
"nalati/grass": {
|
|
52
|
+
"style": "nalati",
|
|
53
|
+
"slot": "grass",
|
|
54
|
+
"duration": 75,
|
|
55
|
+
"lyrics": "loop",
|
|
56
|
+
"bpm": 108,
|
|
57
|
+
"prompt": "Genre: video game soundtrack, Kazakh folk. BPM: 108. Instrumental only, no vocals, no choir. Setting: the Nalati Grasslands, a green river valley of the Kazakh steppe with a nomad yurt camp and horse herds, in an open-world adventure game - wonder first, adventure second, a little melancholy underneath. Arrangement: a warm strummed ostinato on a two-string dombra lute in a galloping 6/8 horse-gait rhythm, a singable melody on a breathy wooden sybyzgy flute with long breaths, a soft drone of a raspy bowed horsehair fiddle (kobyz, a bowed instrument, never plucked) under it; a steady light groove of frame drum (dauylpaz) and soft low hand percussion runs under the whole piece from the second bar to the end. No fade-out: the last bar is as full as the rest. No western orchestra, no piano, no guitar, no synthesizers. Production: natural, close, airy open-air reverb."
|
|
58
|
+
},
|
|
59
|
+
"nalati/sky": {
|
|
60
|
+
"style": "nalati",
|
|
61
|
+
"slot": "sky",
|
|
62
|
+
"duration": 75,
|
|
63
|
+
"lyrics": "loop",
|
|
64
|
+
"bpm": 116,
|
|
65
|
+
"prompt": "Genre: Kazakh folk music, a small village folk trio, video game soundtrack. BPM: 116. Instrumental only, no vocals, no choir. Setting: the Sky Grassland, a golden high plateau where wild horses graze, in an open-world adventure game - bright, light, playful. Arrangement: only three players: a fast strummed two-string dombra lute in a galloping 6/8 horse-gait rhythm, a breathy wooden sybyzgy flute playing a bright dancing melody, and a frame drum with hoof-like hand percussion that runs under the whole piece from the second bar to the end. A jaw harp twang now and then. No fade-out: the last bar is as full as the rest. Strictly no orchestra, no strings section, no brass, no piano, no guitar, no synthesizers. Production: dry, close, a small room.",
|
|
66
|
+
"prompt_v1": "Genre: video game soundtrack, Kazakh folk. BPM: 116. Instrumental only, no vocals, no choir. Setting: the Sky Grassland, a golden high plateau under a huge open sky where wild horses run, in an open-world adventure game - freedom and wonder, wind in the grass. Arrangement: two strummed two-string dombra lutes interlocking in a bright galloping 6/8 horse-gait rhythm, a soaring high melody on a breathy wooden sybyzgy flute, a jaw harp (shankobyz) twang, a raspy bowed horsehair-fiddle drone far under it; a steady driving groove of frame drum and hoof-like hand percussion runs under the whole piece from the second bar to the end. No fade-out: the last bar is as full as the rest. No western orchestra, no piano, no guitar, no synthesizers. Production: wide, bright, open-air reverb.",
|
|
67
|
+
"reroll": "v1 (seeds 301-303) drifted to a cinematic orchestra (CLAP: orchestral strings 44-74 %); v2 is a trio, seeds 311-313"
|
|
68
|
+
},
|
|
69
|
+
"nalati/snow": {
|
|
70
|
+
"style": "nalati",
|
|
71
|
+
"slot": "snow",
|
|
72
|
+
"duration": 75,
|
|
73
|
+
"lyrics": "loop",
|
|
74
|
+
"bpm": 84,
|
|
75
|
+
"prompt": "Genre: video game soundtrack, Kazakh folk. BPM: 84. Instrumental only, no vocals, no choir. Setting: the Snow Lotus Valley, a cold ring of snowfields and a glacier high above the steppe, in an open-world adventure game - cold, lonely, beautiful, a little dangerous. Arrangement: a sparse low plucked ostinato on a two-string dombra lute, a breathy wooden sybyzgy flute melody over a hummed drone, glassy harmonics on a raspy bowed horsehair fiddle; a soft slow groove of muted frame drum and low hand percussion keeps going under the whole piece from the second bar to the end. No fade-out: the last bar is as full as the rest. No western orchestra, no piano, no guitar, no synthesizers. Production: cold, spacious reverb."
|
|
76
|
+
},
|
|
77
|
+
"nalati/night": {
|
|
78
|
+
"style": "nalati",
|
|
79
|
+
"slot": "night",
|
|
80
|
+
"duration": 75,
|
|
81
|
+
"lyrics": "chant",
|
|
82
|
+
"bpm": 72,
|
|
83
|
+
"prompt": "Genre: video game soundtrack, Kazakh folk night theme. BPM: 72. Setting: the Kazakh steppe at night under the stars, wolves somewhere out in the dark, in an open-world adventure game - dark, calm, ancient. Arrangement: a low wordless throat-sung drone (kargyraa) held under the whole piece, a slow mournful melody on a raspy bowed horsehair fiddle (kobyz), sparse plucked notes on a two-string dombra lute; a soft steady frame drum pulse like a distant heartbeat runs under the whole piece from the second bar to the end. No fade-out: the last bar is as full as the rest. No western orchestra, no piano, no guitar, no synthesizers. Production: close, dark, deep reverb."
|
|
84
|
+
},
|
|
85
|
+
"nalati/storm": {
|
|
86
|
+
"style": "nalati",
|
|
87
|
+
"slot": "storm",
|
|
88
|
+
"duration": 75,
|
|
89
|
+
"lyrics": "loop",
|
|
90
|
+
"bpm": 132,
|
|
91
|
+
"prompt": "Genre: Kazakh folk music, fast and fierce, video game battle music. BPM: 132. Instrumental only, no vocals, no choir. Setting: a thunderstorm over the steppe and the fight with Jel Ata, the spirit of the wind, in an open-world adventure game. Arrangement: only folk instruments: two fast furiously strummed two-string dombra lutes in a driving 6/8 gallop, a breathy wooden sybyzgy flute shrieking like the wind, a raspy bowed horsehair fiddle sawing a drone, and pounding frame drums (dauylpaz) and big hand drums that drive the whole piece from the second bar to the end. No fade-out: the last bar is as full as the rest. Strictly no orchestra, no strings section, no brass, no electric guitar, no rock drum kit, no piano, no synthesizers. Production: close, raw, live folk ensemble.",
|
|
92
|
+
"prompt_v1": "Genre: video game soundtrack, Kazakh folk battle music. BPM: 132. Instrumental only, no vocals, no choir. Setting: a thunderstorm breaks over the steppe and the fight with Jel Ata, the giant spirit of the wind, in an open-world adventure game - fury, speed, danger. Arrangement: furious fast strummed two-string dombra lutes in a driving 6/8 gallop, a screaming raspy bowed horsehair fiddle, breathy wooden-flute flurries like gusts of wind; pounding frame drums and big low war drums drive the whole piece from the second bar to the end. No fade-out: the last bar is as full as the rest. No western orchestra, no piano, no guitar, no synthesizers. Production: loud, wide, stormy.",
|
|
93
|
+
"reroll": "v1 (seeds 301-303) came out as band / orchestral battle music (CLAP Kazakh share 0.00-0.41); v2 asks for folk instruments only, seeds 311-313"
|
|
94
|
+
},
|
|
95
|
+
"nalati/king": {
|
|
96
|
+
"style": "nalati",
|
|
97
|
+
"slot": "king",
|
|
98
|
+
"duration": 75,
|
|
99
|
+
"lyrics": "chant",
|
|
100
|
+
"bpm": 96,
|
|
101
|
+
"prompt": "Genre: video game soundtrack, Kazakh folk boss theme. BPM: 96. Setting: inside a Saka burial mound (kurgan), where the Golden King, an undead warrior king in gold armour, rises, in an open-world adventure game - a funeral dirge that turns into battle. Arrangement: it opens with a deep wordless throat-sung drone (kargyraa) and a mournful raspy bowed horsehair fiddle, then rises into battle: heavy frame drums and a war-drum groove enter in the second bar and drive the whole piece to the end, hammering strums on a two-string dombra lute in a 6/8 ostinato, the throat drone under everything. No fade-out: the last bar is as full as the rest. No western orchestra, no piano, no guitar, no synthesizers. Production: dark, stone-chamber reverb."
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|