You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-1Lines changed: 20 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ In January 2025, Hugging Face announced [Inference Providers](https://huggingfac
6
6
7
7
This repo contains a [mapping](src/models.ts) of Replicate models to Hugging Face models, so we can tell Hugging Face when to display a Replicate inference widget on its model pages.
8
8
9
-
This repo also includes tooling to keep those mappings up to date using Hugging Face's Model Mappings API.
9
+
This repo also includes tooling to keep those mappings up to date using Hugging Face's [Model Mappings API](https://huggingface.co/docs/inference-providers/register-as-a-provider#3-model-mapping-api).
10
10
11
11
## Adding a new model
12
12
@@ -24,6 +24,25 @@ Add your new model to the `inferenceModels` array, like so:
24
24
25
25
To see allowable values for `task`, refer to [huggingface.co/tasks](https://huggingface.co/tasks).
26
26
27
+
## Adding a new tag mapping
28
+
29
+
To add a new tag mapping, edit [src/tags.ts](src/tags.ts)
30
+
31
+
Add your new tag to the `inferenceTags` array, like so:
32
+
33
+
```typescript
34
+
{
35
+
type: 'tag-filter',
36
+
task: 'text-to-image',
37
+
tags: ['flux', 'lora'],
38
+
providerModel: 'black-forest-labs/flux-dev-lora',
39
+
adapterType: 'lora',
40
+
status: 'live',
41
+
}
42
+
```
43
+
44
+
Tag mappings allow you to map multiple Hugging Face models to a single Replicate model based on their tags. This is useful when you have a single Replicate model that can handle multiple variations of a model (like different LoRA adapters).
45
+
27
46
## Updating model mappings
28
47
29
48
This repo uses a [GitHub Actions workflow](.github/workflows/sync.yml) to keep the model mappings up to date, as well as model warm/cold states.
0 commit comments