custom-blocks

Solid

Use when the user has written (or wants to write) a `ModularPipelineBlocks` subclass in a local Python file and needs to package it into a Hub-uploadable directory. Covers the workflow from a single `block.py` file to a published custom-block repo that consumers can load via `ModularPipeline.from_pretrained(<repo>, trust_remote_code=True)`.

AI & Automation 55 stars 2 forks Updated 5 days ago MIT

Install

View on GitHub

Quality Score: 83/100

Stars 20%
58
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

## What this skill is for A `ModularPipelineBlocks` subclass is a unit of pipeline logic — input/output spec plus a `__call__` — that slots into diffusers' modular pipeline composition. Once you have one defined locally, you almost always want to publish it as a small Hub repo so others can `from_pretrained` it. `diffusers-cli custom_blocks` automates the packaging step: it parses your Python file, instantiates the chosen block class, and writes a `save_pretrained`-style directory in your cwd that's ready to push to the Hub. Use this skill when: - The user is writing a custom modular block and asks "how do I publish this?" or "package this for the Hub". - The user has a `block.py` (or similar) file with one or more `ModularPipelineBlocks` subclasses. - You're scaffolding a new modular pipeline repo and need the on-disk layout that `ModularPipelineBlocks.from_pretrained` expects. Don't use this skill for: running an existing modular pipeline (`diffusers-cli run`), introspecting one (`diffusers-cli schema`), or writing the block class itself — this skill packages an *already-written* block. ## The end-to-end workflow ``` [you: write block.py] → diffusers-cli custom_blocks → [packaged dir in cwd] ↓ hf upload <repo> . ↓ consumers: ModularPipeline.from_pretrained(<repo>, trust_rem...

Details

Author
modem-dev
Repository
modem-dev/ossrules
Created
1 weeks ago
Last Updated
5 days ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

block-creation

Scaffold a new SeldonFrame block from a natural-language intent. Use when the builder says "build me a block that ...", "scaffold a block that ...", or similar. Produces a real, validated block skeleton in packages/crm/src/blocks/ — BLOCK.md with composition contract, tools.ts with Zod schemas, subscription handler stubs (when reactive), and test.todo stubs per tool. Does NOT commit, does NOT install into any workspace. Builder owns review + git.

51 Updated yesterday
seldonframe
Code & Development Listed

publishing-skills

Use when taking a working agent skill out of a messy development folder and preparing it as a clean, standalone, provider-agnostic repository for publication or sharing on GitHub. Triggers on "publish this skill", "release this skill as a repo", "open-source this skill", "package this skill for GitHub", "turn this dev folder into a clean repo", "make a shareable version of this skill", or preparing a skill for a public audience.

0 Updated 2 days ago
spunt
AI & Automation Listed

claude-skill-plugin-packaging

Package Claude Code skills as a plugin plus marketplace and install them into other repos — globally, pinned per project via committed settings, or as a skills-dir plugin. Use when sharing skills across repos, wiring an existing skill plugin into a project, choosing flat project skills versus a plugin, aggregating other people's skill repos by reference, or when a submodule or nested folder of skills is not being discovered. Does not cover PR/issue mechanics (github-contribution-workflow) or how to write the skill itself (skill-authoring-patterns).

18 Updated 1 weeks ago
wei18