os-model-node-impl

Implements Griptape Nodes wrapping open-source model features from a spec file.

2|2|Updated Mar 26, 2025
One-click install
npx skills add https://github.com/griptape-ai/griptape-nodes-library-template --skill os-model-node-impl-griptape-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: os-model-node-impl
Source: https://github.com/griptape-ai/griptape-nodes-library-template/tree/main/.claude/skills/os-model-node-impl
Command: npx skills add https://github.com/griptape-ai/griptape-nodes-library-template --skill os-model-node-impl-griptape-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building Griptape Nodes that wrap an open-source ML model requires repetitive boilerplate: parameter setup, HuggingFace model selection, async inference, artifact handling, manifest registration, and lint compliance. This Skill automates that entire implementation workflow from a single spec file. ## Core Features & Use Cases - Spec-Driven Node Generation: Reads a spec file and creates node Python files using the SuccessFailureNode + AsyncResult pattern with deferred submodule imports and class-level model caching. - Built-in Parameter Components: Enforces correct use of HuggingFaceRepoParameter, SeedParameter, and ProjectFileParameter instead of raw parameters, including runtime checkpoint filename resolution. - Artifact & Media Handling: Reads and writes image, audio, and video artifacts via URL artifacts and File-based macro path resolution to avoid WebSocket saturation. - Manifest Registration & Validation: Registers each node in griptape-nodes-library.json, runs make check/make fix for lint compliance, and writes a complete library README. - Use Case: Given a spec describing an audio generation model with HuggingFace repo IDs, generate the full node file, register it in the manifest, pass pyright/ruff checks, and produce the library README in one run. ## Quick Start Run the skill with the path to your node spec file, for example: implement the nodes described in specs/my-model-spec.md.

Frequently Asked Questions about os-model-node-impl

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Griptape Nodes node that wraps an open-source ML model?

Provide a spec file defining the nodes, inputs, outputs, and HuggingFace models, then run this skill with the spec path. It generates node Python files using SuccessFailureNode with AsyncResult, registers them in the library manifest, and runs lint checks.

How do I add HuggingFace model selection to a Griptape Nodes parameter?

Use HuggingFaceRepoParameter with a list of repo IDs instead of a plain Parameter with dropdown options. It reads locally cached models, shows a download warning when none exist, and returns the selection via get_repo_revision().

Why must submodule imports be deferred inside Griptape Nodes methods?

Imports from the OS model submodule must live inside methods, not at module top level, because they only resolve after the advanced library initializes the submodule. Top-level imports would fail at library load time.

Can Griptape Nodes output raw audio or image bytes directly?

No. Large binary payloads saturate the WebSocket event stream. Write media via ProjectFileParameter's build_file and write_bytes, then emit a URL artifact like AudioUrlArtifact using the saved location.

What lint checks must a Griptape Nodes library pass?

Run make check at the library root, and make fix if it fails. Common issues include unused imports, missing type annotations, process() not returning AsyncResult[None], and unguarded __file__ usage.