Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

model-integration

Skill by huggingface

Guides an AI assistant through adding a new model or pipeline to Hugging Face diffusers, from setup and weight conversion to parity testing and Hub checkpoint layout. Intended for diffusers contributors integrating a model.

  • Score 90
  • 35k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install model-integration

Built from the published package, never by AI.

git clone --depth 1 https://github.com/huggingface/diffusers /tmp/diffusers && mkdir -p ~/.claude/skills && cp -r /tmp/diffusers/.ai/skills/model-integration ~/.claude/skills/model-integration

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install model-integration in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The model-integration skill guides an AI assistant through adding a new model or pipeline to Hugging Face diffusers. It starts by gathering the reference repo, a runnable inference script, and a choice between standard and modular pipelines, then confirms the plan with the user. It then works through a checklist covering the transformer, VAE, scheduler, pipeline, tests, and docs.

The skill covers converting original checkpoints with a standalone script, and checking numerical parity against the reference on CPU in float32 with a strict tolerance. It also describes assembling a Hub checkpoint that loads with ModularPipeline.from_pretrained. It is written for contributors integrating a new model into diffusers, and it defaults to modular pipelines.

Written from the project's SKILL.md and checked against it.

What it can do

  • Setup gatheringCollects the reference repo, a runnable inference script, and the pipeline style before any code is written.
  • Integration checklistWalks through the transformer, VAE, scheduler, pipeline, Hub checkpoint, docs, and style steps.
  • Weight conversionDescribes mapping original state-dict keys to diffusers module names with a standalone conversion script.
  • Hub checkpoint layoutExplains separate-repo and same-repo layouts and the modular_model_index.json file they rely on.
  • Parity testingCompares converted components against the reference with max_diff below 1e-3 on CPU in float32.
  • Test guidancePoints to conventions for pipeline-level and model-level tests in the diffusers test suite.
  • File structureLists the source, test, and docs files a new model pull request usually adds.

What you need

  • Reference implementation repo and its checkpoint
  • A runnable end-to-end inference script from the user
  • PyTorch
  • A local clone of the diffusers repository

Try asking

  • Help me add my new model to diffusers, starting with the setup questions
  • Convert my original checkpoint to diffusers format with a conversion script
  • Write a parity test comparing my diffusers model with the reference model

Good to know

  • Modular pipelines are the default, and the standard DiffusionPipeline is still supported
  • The parity test imports the reference repo and must not be shipped in the pull request
  • A modular index is required when weights share a repo with the reference and folder names clash

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .ai/skills/model-integration/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md10 KB

Alternatives to model-integration

All alternatives →

Compare with agent-reproduce-align, google_contacts or m06-error-handling

model-integration: common questions

What tolerance does the parity test use?

The source sets a strict tolerance of max_diff below 1e-3, checked on CPU in float32 with the freshly converted weights.

Should the parity test be included in the pull request?

No. The source says it is an internal verification tool that imports the reference repo, and it should not be shipped.

Where can the converted diffusers weights be hosted?

The user decides between a separate repo and the reference checkpoint's repo. The source recommends keeping each repo self-contained, with every component pointing at that repo.

How do I install model-integration?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is model-integration free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is model-integration safe to use?

It scores 90 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to model-integration?

Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.

model-integration Install

Add to stack

Loading.