Skip to content

Commit 6f2010e

Browse files
yiyixuxuclaudestevhliu
authored
Auto-reply to new model requests with remote code guidance (#14343)
* Auto-reply to new model requests with Modular Diffusers guidance Points new model/pipeline/scheduler requests at building a Hub-hosted modular pipeline instead of waiting on a core PR, and asks requesters to tag @asomoza when they have something to share. Gates on the `### Model/Pipeline/Scheduler description` heading the issue form renders rather than on a label: the label the template declares does not exist in this repo, so GitHub never applies it, and template labels land after issue creation anyway. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Apply suggestion from @yiyixuxu * Tighten the new model request reply Lead with starting on the Hub and frame what follows as a support decision (work with the authors, upstream a community version, or point people at the Hub one) rather than a soft no to PRs. Trims the message by collapsing the author section and the resource list. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Link the Modular Pipelines collection in the reply Community-built model pipelines belong in the Modular Pipelines collection rather than Custom Blocks, so point the "we'll add the ones we like" line there and keep both collections in the resource list. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Recommend starting on the Hub for new models Adds a callout to the contribution guide asking model authors to get in touch on a feature request, and community contributors to coordinate there and start with a Hub repo at the same time. Points agents the same way: default to publishing a modular pipeline as remote code rather than opening a PR against src/diffusers. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Apply suggestion from @yiyixuxu * Apply suggestion from @yiyixuxu * Update .github/workflows/new_model_request_reply.yml Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> * Consolidate the Hub-first guidance into one place stevhliu noted the new callout in "Adding pipelines, models, schedulers" overlapped the last two paragraphs of the AI-assisted contributions section. Drop the community-contributor paragraph there — it is general contribution policy rather than agent-specific guidance — and point the model-author paragraph at the callout instead. Carry the custom models link over so the non-modular Hub path stays covered. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
1 parent f83ba3b commit 6f2010e

2 files changed

Lines changed: 49 additions & 3 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: New Model Request Reply
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
reply:
9+
name: Point new model requests at Modular Diffusers
10+
# Match the heading the issue form renders for its first field rather than a label: template
11+
# labels are applied after the issue is created, so `github.event.issue.labels` is empty here.
12+
# Keep this string in sync with .github/ISSUE_TEMPLATE/new-model-addition.yml.
13+
if: >-
14+
github.repository == 'huggingface/diffusers' &&
15+
contains(github.event.issue.body, '### Model/Pipeline/Scheduler description')
16+
runs-on: ubuntu-latest
17+
permissions:
18+
issues: write
19+
steps:
20+
- name: Post Modular Diffusers guidance
21+
env:
22+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
GH_REPO: ${{ github.repository }}
24+
ISSUE_NUMBER: ${{ github.event.issue.number }}
25+
BODY: |
26+
Thanks for the request!
27+
28+
**How new model support works in Diffusers**
29+
30+
We're a small team, and our review queue shouldn't be what decides whether a model is usable in Diffusers. With [Modular Diffusers](https://huggingface.co/docs/diffusers/modular_diffusers/overview), a pipeline can live as remote code in any Hub repo and load straight from there with `from_pretrained`.
31+
32+
🛠️ **Want to bring this model to Diffusers?**
33+
34+
Please start with a Hub repo — you don't need anything from us to do that, and people can use it immediately. From there we decide how to support it: we might work with the authors, upstream an existing community version, or just point people at the one on the Hub. The pipelines we integrate are usually the ones people are already running.
35+
36+
Tag `@asomoza` when you have something to share — we'll give feedback on the implementation, help get it in front of people, and add the ones we like to our hand-picked [Modular Pipelines](https://huggingface.co/collections/diffusers/modular-pipelines) collection. Tell us where you hit friction along the way, too: confusing APIs, missing docs, bugs. That feedback is worth as much to us as the pipeline.
37+
38+
👋 **Are you an author of the model?** We'd love to hear from you — comment here and we'll help you pick the path that fits.
39+
40+
📚 [Quickstart](https://huggingface.co/docs/diffusers/modular_diffusers/quickstart) · [Building custom blocks](https://huggingface.co/docs/diffusers/modular_diffusers/custom_blocks) — template repo, and how to publish to the Hub · [Modular Pipelines](https://huggingface.co/collections/diffusers/modular-pipelines) and [Custom Blocks](https://huggingface.co/collections/diffusers/modular-diffusers-custom-blocks) — examples to crib from
41+
42+
*This is an automated message.*
43+
run: gh issue comment "$ISSUE_NUMBER" --body "$BODY"

docs/source/en/conceptual/contribution.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,11 @@ Good second issues are usually more difficult to get merged compared to good fir
332332

333333
### 9. Adding pipelines, models, schedulers
334334

335+
> [!TIP]
336+
> If you are the model's author, please get in touch so we can coordinate the integration with you: open a feature request, or drop a comment if one is already open.
337+
>
338+
> If you are a community contributor, please also let us know you're interested under the feature request, and start with a Hub repo at the same time. See the [Modular Diffusers](../modular_diffusers/overview) guide to get started, and [custom blocks](../modular_diffusers/custom_blocks) or [custom models](../using-diffusers/automodel) for publishing as remote code on the Hub.
339+
335340
Pipelines, models, and schedulers are the most important pieces of the Diffusers library.
336341
They provide easy access to state-of-the-art diffusion technologies and thus allow the community to
337342
build powerful generative AI applications.
@@ -605,6 +610,4 @@ AI-assisted contributions are welcome, but they must be coordinated, scoped, and
605610
- The **test commands you ran** and their results (paste relevant output, not just "tests pass").
606611
- Your **self-review notes** (or a link to the PR comment containing them), as described above.
607612

608-
If you are a model author or part of a team that officially maintains a model, we encourage you to use agents for a new model integration. Follow the repository's [recommended setup](https://github.com/huggingface/diffusers/blob/main/.ai/AGENTS.md) and use the [`model-integration`](https://github.com/huggingface/diffusers/blob/main/.ai/skills/model-integration/SKILL.md) skill. Coordinate the scope with maintainers before opening a PR.
609-
610-
If you are contributing a model to Diffusers for the first time as a community contributor, we generally recommend starting with a custom implementation that loads code from the Hub. This gives users access to the model while its integration into the core library is evaluated. See the [custom models](../using-diffusers/automodel) and [custom modular blocks](../modular_diffusers/custom_blocks) guides for supported patterns.
613+
If you are a model author or part of a team that officially maintains a model, we encourage you to use agents for a new model integration. Follow the repository's [recommended setup](https://github.com/huggingface/diffusers/blob/main/.ai/AGENTS.md) and use the [`model-integration`](https://github.com/huggingface/diffusers/blob/main/.ai/skills/model-integration/SKILL.md) skill. Coordinate the scope with maintainers before opening a PR — see [Adding pipelines, models, schedulers](#9-adding-pipelines-models-schedulers).

0 commit comments

Comments
 (0)