Commit e824d26
authored
[Inference] Overrides snippets inputs (#1613)
So we can call
```js
snippets.getInferenceSnippets(model, "auto", undefined, {
inputs: `"A dog with a baseball cap"`
});
```
to get the following sample
```python
# output is a PIL.Image object
image = client.text_to_image(
"A dog with a baseball cap",
model="black-forest-labs/FLUX.1-dev",
)
```
instead of the default input in the snippet:
```python
image = client.text_to_image(
"Astronaut riding a horse",
model="black-forest-labs/FLUX.1-dev",
)
```
it's already possible to do it for `text-generation` with `opts.mesages`
needed for (internal
huggingface-internal/moon-landing#14421)1 parent a014b62 commit e824d26
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
170 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
171 | 176 | | |
172 | 177 | | |
173 | 178 | | |
| |||
0 commit comments