@huggingface/tasks 0.19.66 → 0.19.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/commonjs/dataset-libraries.d.ts +6 -0
  2. package/dist/commonjs/dataset-libraries.d.ts.map +1 -1
  3. package/dist/commonjs/dataset-libraries.js +6 -0
  4. package/dist/commonjs/hardware.d.ts +4 -0
  5. package/dist/commonjs/hardware.d.ts.map +1 -1
  6. package/dist/commonjs/hardware.js +5 -1
  7. package/dist/commonjs/local-apps.d.ts +0 -7
  8. package/dist/commonjs/local-apps.d.ts.map +1 -1
  9. package/dist/commonjs/local-apps.js +0 -7
  10. package/dist/commonjs/model-libraries-snippets.d.ts +1 -0
  11. package/dist/commonjs/model-libraries-snippets.d.ts.map +1 -1
  12. package/dist/commonjs/model-libraries-snippets.js +16 -3
  13. package/dist/commonjs/model-libraries.d.ts +64 -29
  14. package/dist/commonjs/model-libraries.d.ts.map +1 -1
  15. package/dist/commonjs/model-libraries.js +68 -33
  16. package/dist/commonjs/pipelines.d.ts +9 -1
  17. package/dist/commonjs/pipelines.d.ts.map +1 -1
  18. package/dist/commonjs/pipelines.js +8 -0
  19. package/dist/commonjs/snippets/inputs.d.ts.map +1 -1
  20. package/dist/commonjs/snippets/inputs.js +10 -0
  21. package/dist/commonjs/tasks/image-text-to-image/data.d.ts +4 -0
  22. package/dist/commonjs/tasks/image-text-to-image/data.d.ts.map +1 -0
  23. package/dist/commonjs/tasks/image-text-to-image/data.js +50 -0
  24. package/dist/commonjs/tasks/image-text-to-image/inference.d.ts +76 -0
  25. package/dist/commonjs/tasks/image-text-to-image/inference.d.ts.map +1 -0
  26. package/dist/commonjs/tasks/image-text-to-image/inference.js +2 -0
  27. package/dist/commonjs/tasks/image-text-to-video/data.d.ts +4 -0
  28. package/dist/commonjs/tasks/image-text-to-video/data.d.ts.map +1 -0
  29. package/dist/commonjs/tasks/image-text-to-video/data.js +50 -0
  30. package/dist/commonjs/tasks/image-text-to-video/inference.d.ts +78 -0
  31. package/dist/commonjs/tasks/image-text-to-video/inference.d.ts.map +1 -0
  32. package/dist/commonjs/tasks/image-text-to-video/inference.js +2 -0
  33. package/dist/commonjs/tasks/index.d.ts +2 -0
  34. package/dist/commonjs/tasks/index.d.ts.map +1 -1
  35. package/dist/commonjs/tasks/index.js +72 -66
  36. package/dist/esm/dataset-libraries.d.ts +6 -0
  37. package/dist/esm/dataset-libraries.d.ts.map +1 -1
  38. package/dist/esm/dataset-libraries.js +6 -0
  39. package/dist/esm/hardware.d.ts +4 -0
  40. package/dist/esm/hardware.d.ts.map +1 -1
  41. package/dist/esm/hardware.js +5 -1
  42. package/dist/esm/local-apps.d.ts +0 -7
  43. package/dist/esm/local-apps.d.ts.map +1 -1
  44. package/dist/esm/local-apps.js +0 -7
  45. package/dist/esm/model-libraries-snippets.d.ts +1 -0
  46. package/dist/esm/model-libraries-snippets.d.ts.map +1 -1
  47. package/dist/esm/model-libraries-snippets.js +12 -0
  48. package/dist/esm/model-libraries.d.ts +64 -29
  49. package/dist/esm/model-libraries.d.ts.map +1 -1
  50. package/dist/esm/model-libraries.js +68 -33
  51. package/dist/esm/pipelines.d.ts +9 -1
  52. package/dist/esm/pipelines.d.ts.map +1 -1
  53. package/dist/esm/pipelines.js +8 -0
  54. package/dist/esm/snippets/inputs.d.ts.map +1 -1
  55. package/dist/esm/snippets/inputs.js +10 -0
  56. package/dist/esm/tasks/image-text-to-image/data.d.ts +4 -0
  57. package/dist/esm/tasks/image-text-to-image/data.d.ts.map +1 -0
  58. package/dist/esm/tasks/image-text-to-image/data.js +48 -0
  59. package/dist/esm/tasks/image-text-to-image/inference.d.ts +76 -0
  60. package/dist/esm/tasks/image-text-to-image/inference.d.ts.map +1 -0
  61. package/dist/esm/tasks/image-text-to-image/inference.js +1 -0
  62. package/dist/esm/tasks/image-text-to-video/data.d.ts +4 -0
  63. package/dist/esm/tasks/image-text-to-video/data.d.ts.map +1 -0
  64. package/dist/esm/tasks/image-text-to-video/data.js +48 -0
  65. package/dist/esm/tasks/image-text-to-video/inference.d.ts +78 -0
  66. package/dist/esm/tasks/image-text-to-video/inference.d.ts.map +1 -0
  67. package/dist/esm/tasks/image-text-to-video/inference.js +1 -0
  68. package/dist/esm/tasks/index.d.ts +2 -0
  69. package/dist/esm/tasks/index.d.ts.map +1 -1
  70. package/dist/esm/tasks/index.js +6 -0
  71. package/package.json +1 -1
  72. package/src/dataset-libraries.ts +6 -0
  73. package/src/hardware.ts +5 -1
  74. package/src/local-apps.ts +0 -7
  75. package/src/model-libraries-snippets.ts +13 -0
  76. package/src/model-libraries.ts +68 -33
  77. package/src/pipelines.ts +8 -0
  78. package/src/snippets/inputs.ts +12 -0
  79. package/src/tasks/image-text-to-image/about.md +73 -0
  80. package/src/tasks/image-text-to-image/data.ts +54 -0
  81. package/src/tasks/image-text-to-image/inference.ts +75 -0
  82. package/src/tasks/image-text-to-image/spec/input.json +59 -0
  83. package/src/tasks/image-text-to-image/spec/output.json +13 -0
  84. package/src/tasks/image-text-to-video/about.md +71 -0
  85. package/src/tasks/image-text-to-video/data.ts +54 -0
  86. package/src/tasks/image-text-to-video/inference.ts +77 -0
  87. package/src/tasks/image-text-to-video/spec/input.json +63 -0
  88. package/src/tasks/image-text-to-video/spec/output.json +13 -0
  89. package/src/tasks/index.ts +16 -0
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Inference code generated from the JSON schema spec in ./spec
3
+ *
4
+ * Using src/scripts/inference-codegen
5
+ */
6
+ /**
7
+ * Inputs for Image Text To Video inference. Either inputs (image) or prompt (in parameters)
8
+ * must be provided, or both.
9
+ */
10
+ export interface ImageTextToVideoInput {
11
+ /**
12
+ * The input image data as a base64-encoded string. If no `parameters` are provided, you can
13
+ * also provide the image data as a raw bytes payload. Either this or prompt must be
14
+ * provided.
15
+ */
16
+ inputs?: Blob;
17
+ /**
18
+ * Additional inference parameters for Image Text To Video
19
+ */
20
+ parameters?: ImageTextToVideoParameters;
21
+ [property: string]: unknown;
22
+ }
23
+ /**
24
+ * Additional inference parameters for Image Text To Video
25
+ */
26
+ export interface ImageTextToVideoParameters {
27
+ /**
28
+ * For diffusion models. A higher guidance scale value encourages the model to generate
29
+ * videos closely linked to the text prompt at the expense of lower image quality.
30
+ */
31
+ guidance_scale?: number;
32
+ /**
33
+ * One prompt to guide what NOT to include in video generation.
34
+ */
35
+ negative_prompt?: string;
36
+ /**
37
+ * The num_frames parameter determines how many video frames are generated.
38
+ */
39
+ num_frames?: number;
40
+ /**
41
+ * The number of denoising steps. More denoising steps usually lead to a higher quality
42
+ * video at the expense of slower inference.
43
+ */
44
+ num_inference_steps?: number;
45
+ /**
46
+ * The text prompt to guide the video generation. Either this or inputs (image) must be
47
+ * provided.
48
+ */
49
+ prompt?: string;
50
+ /**
51
+ * Seed for the random number generator.
52
+ */
53
+ seed?: number;
54
+ /**
55
+ * The size in pixel of the output video frames.
56
+ */
57
+ target_size?: TargetSize;
58
+ [property: string]: unknown;
59
+ }
60
+ /**
61
+ * The size in pixel of the output video frames.
62
+ */
63
+ export interface TargetSize {
64
+ height: number;
65
+ width: number;
66
+ [property: string]: unknown;
67
+ }
68
+ /**
69
+ * Outputs of inference for the Image Text To Video task
70
+ */
71
+ export interface ImageTextToVideoOutput {
72
+ /**
73
+ * The generated video returned as raw bytes in the payload.
74
+ */
75
+ video: unknown;
76
+ [property: string]: unknown;
77
+ }
78
+ //# sourceMappingURL=inference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/image-text-to-video/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACrC;;;;OAIG;IACH,MAAM,CAAC,EAAE,IAAI,CAAC;IACd;;OAEG;IACH,UAAU,CAAC,EAAE,0BAA0B,CAAC;IACxC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B"}
@@ -0,0 +1 @@
1
+ export {};
@@ -10,6 +10,8 @@ export type * from "./image-to-image/inference.js";
10
10
  export type { ImageToTextInput, ImageToTextOutput, ImageToTextParameters } from "./image-to-text/inference.js";
11
11
  export type * from "./image-segmentation/inference.js";
12
12
  export type { ImageToVideoInput, ImageToVideoOutput, ImageToVideoParameters } from "./image-to-video/inference.js";
13
+ export type { ImageTextToImageInput, ImageTextToImageOutput, ImageTextToImageParameters, } from "./image-text-to-image/inference.js";
14
+ export type { ImageTextToVideoInput, ImageTextToVideoOutput, ImageTextToVideoParameters, } from "./image-text-to-video/inference.js";
13
15
  export type * from "./object-detection/inference.js";
14
16
  export type * from "./depth-estimation/inference.js";
15
17
  export type * from "./question-answering/inference.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tasks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E,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACZ,GACD;IACA,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,KAAK,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACb,CAAC,CAAC;IACH,IAAI,EAAE,kBAAkB,CAAC;CACxB,CAAC;AAEL,MAAM,WAAW,QAAQ;IACxB,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,OAAO,EAAE,aAAa,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,QAAQ;IACxB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,YAAY,CAAC;IACjB,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,eAAe,EAAE,CAAC;IAC7B,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,EAAE,IAAI,GAAG,OAAO,GAAG,WAAW,CAAC,CAAC"}
@@ -12,6 +12,8 @@ import imageFeatureExtraction from "./image-feature-extraction/data.js";
12
12
  import imageToImage from "./image-to-image/data.js";
13
13
  import imageToText from "./image-to-text/data.js";
14
14
  import imageTextToText from "./image-text-to-text/data.js";
15
+ import imageTextToImage from "./image-text-to-image/data.js";
16
+ import imageTextToVideo from "./image-text-to-video/data.js";
15
17
  import imageSegmentation from "./image-segmentation/data.js";
16
18
  import imageToVideo from "./image-to-video/data.js";
17
19
  import maskGeneration from "./mask-generation/data.js";
@@ -62,6 +64,8 @@ export const TASKS_MODEL_LIBRARIES = {
62
64
  "image-feature-extraction": ["timm", "transformers"],
63
65
  "image-segmentation": ["transformers", "transformers.js"],
64
66
  "image-text-to-text": ["transformers"],
67
+ "image-text-to-image": ["diffusers"],
68
+ "image-text-to-video": ["diffusers"],
65
69
  "image-to-image": ["diffusers", "transformers", "transformers.js"],
66
70
  "image-to-text": ["transformers", "transformers.js"],
67
71
  "image-to-video": ["diffusers"],
@@ -147,6 +151,8 @@ export const TASKS_DATA = {
147
151
  "image-segmentation": getData("image-segmentation", imageSegmentation),
148
152
  "image-to-image": getData("image-to-image", imageToImage),
149
153
  "image-text-to-text": getData("image-text-to-text", imageTextToText),
154
+ "image-text-to-image": getData("image-text-to-image", imageTextToImage),
155
+ "image-text-to-video": getData("image-text-to-video", imageTextToVideo),
150
156
  "image-to-text": getData("image-to-text", imageToText),
151
157
  "image-to-video": getData("image-to-video", imageToVideo),
152
158
  "keypoint-detection": getData("keypoint-detection", keypointDetection),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huggingface/tasks",
3
- "version": "0.19.66",
3
+ "version": "0.19.68",
4
4
  "description": "List of ML tasks for huggingface.co/tasks",
5
5
  "repository": "https://github.com/huggingface/huggingface.js.git",
6
6
  "publishConfig": {
@@ -83,6 +83,12 @@ export const DATASET_LIBRARIES_UI_ELEMENTS = {
83
83
  repoUrl: "https://github.com/duckdb/duckdb",
84
84
  docsUrl: "https://huggingface.co/docs/hub/datasets-duckdb",
85
85
  },
86
+ datadesigner: {
87
+ prettyLabel: "NeMo Data Designer",
88
+ repoName: "datadesigner",
89
+ repoUrl: "https://github.com/NVIDIA-NeMo/DataDesigner",
90
+ docsUrl: "https://nvidia-nemo.github.io/DataDesigner/",
91
+ },
86
92
  } satisfies Record<string, DatasetLibraryUiElement>;
87
93
 
88
94
  /// List of the dataset libraries supported by the Hub
package/src/hardware.ts CHANGED
@@ -66,6 +66,10 @@ export const SKUS = {
66
66
  tflops: 30.29,
67
67
  memory: [24],
68
68
  },
69
+ GB10: {
70
+ tflops: 29.71,
71
+ memory: [128],
72
+ },
69
73
  "RTX PRO 6000 WS": {
70
74
  tflops: 126,
71
75
  memory: [96],
@@ -308,7 +312,7 @@ export const SKUS = {
308
312
  },
309
313
  "RTX 3050 Mobile": {
310
314
  tflops: 7.639,
311
- memory: [6],
315
+ memory: [4, 6],
312
316
  },
313
317
  "RTX 2060": {
314
318
  tflops: 12.9,
package/src/local-apps.ts CHANGED
@@ -517,13 +517,6 @@ export const LOCAL_APPS = {
517
517
  model.tags.includes("coreml") && model.tags.includes("joyfusion") && model.pipeline_tag === "text-to-image",
518
518
  deeplink: (model) => new URL(`https://joyfusion.app/import_from_hf?repo_id=${model.id}`),
519
519
  },
520
- invoke: {
521
- prettyLabel: "Invoke",
522
- docsUrl: "https://github.com/invoke-ai/InvokeAI",
523
- mainTask: "text-to-image",
524
- displayOnModelPage: (model) => model.library_name === "diffusers" && model.pipeline_tag === "text-to-image",
525
- deeplink: (model) => new URL(`https://models.invoke.ai/huggingface/${model.id}`),
526
- },
527
520
  ollama: {
528
521
  prettyLabel: "Ollama",
529
522
  docsUrl: "https://ollama.com",
@@ -331,6 +331,19 @@ output = model.generate(text)
331
331
  sf.write("simple.mp3", output, 44100)`,
332
332
  ];
333
333
 
334
+ export const dia2 = (model: ModelData): string[] => [
335
+ `from dia2 import Dia2, GenerationConfig, SamplingConfig
336
+
337
+ dia = Dia2.from_repo("${model.id}", device="cuda", dtype="bfloat16")
338
+ config = GenerationConfig(
339
+ cfg_scale=2.0,
340
+ audio=SamplingConfig(temperature=0.8, top_k=50),
341
+ use_cuda_graph=True,
342
+ )
343
+ result = dia.generate("[S1] Hello Dia2!", config=config, output_wav="hello.wav", verbose=True)
344
+ `,
345
+ ];
346
+
334
347
  export const describe_anything = (model: ModelData): string[] => [
335
348
  `# pip install git+https://github.com/NVlabs/describe-anything
336
349
  from huggingface_hub import snapshot_download
@@ -187,6 +187,25 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
187
187
  filter: false,
188
188
  countDownloads: `path:"boltzgen1_diverse.ckpt"`,
189
189
  },
190
+ cancertathomev2: {
191
+ prettyLabel: "Cancer@HomeV2",
192
+ repoName: "Cancer@HomeV2",
193
+ repoUrl: "https://huggingface.co/OpenPeerAI/CancerAtHomeV2",
194
+ filter: false,
195
+ countDownloads: `path:"run.py"`,
196
+ },
197
+ cartesia_pytorch: {
198
+ prettyLabel: "Cartesia Pytorch",
199
+ repoName: "Cartesia Pytorch",
200
+ repoUrl: "https://github.com/cartesia-ai/cartesia_pytorch",
201
+ snippets: snippets.cartesia_pytorch,
202
+ },
203
+ cartesia_mlx: {
204
+ prettyLabel: "Cartesia MLX",
205
+ repoName: "Cartesia MLX",
206
+ repoUrl: "https://github.com/cartesia-ai/cartesia_mlx",
207
+ snippets: snippets.cartesia_mlx,
208
+ },
190
209
  champ: {
191
210
  prettyLabel: "Champ",
192
211
  repoName: "Champ",
@@ -201,6 +220,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
201
220
  countDownloads: `path:"tokenizer.json"`,
202
221
  filter: false,
203
222
  },
223
+ chaossim: {
224
+ prettyLabel: "ChaosSIM",
225
+ repoName: "ChaosSIM",
226
+ repoUrl: "https://huggingface.co/OpenPeerAI/ChaosSIM/",
227
+ countDownloads: `path:"ChaosSim.nb"`,
228
+ filter: false,
229
+ },
204
230
  chat_tts: {
205
231
  prettyLabel: "ChatTTS",
206
232
  repoName: "ChatTTS",
@@ -215,6 +241,20 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
215
241
  repoUrl: "https://github.com/amazon-science/chronos-forecasting",
216
242
  snippets: snippets.chronos_forecasting,
217
243
  },
244
+ clara: {
245
+ prettyLabel: "Clara",
246
+ repoName: "Clara",
247
+ filter: false,
248
+ repoUrl: "https://github.com/nvidia/clara",
249
+ countDownloads: `path_extension:"ckpt" OR path:"config.json"`,
250
+ },
251
+ clipscope: {
252
+ prettyLabel: "clipscope",
253
+ repoName: "clipscope",
254
+ repoUrl: "https://github.com/Lewington-pitsos/clipscope",
255
+ filter: false,
256
+ countDownloads: `path_extension:"pt"`,
257
+ },
218
258
  "cloud-agents": {
219
259
  prettyLabel: "Cloud Agents",
220
260
  repoName: "Cloud Agents",
@@ -222,6 +262,20 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
222
262
  filter: false,
223
263
  countDownloads: `path:"setup.py"`,
224
264
  },
265
+ cosyvoice: {
266
+ prettyLabel: "CosyVoice",
267
+ repoName: "CosyVoice",
268
+ repoUrl: "https://github.com/FunAudioLLM/CosyVoice",
269
+ filter: false,
270
+ countDownloads: `path_extension:"onnx" OR path_extension:"pt"`,
271
+ },
272
+ cotracker: {
273
+ prettyLabel: "CoTracker",
274
+ repoName: "CoTracker",
275
+ repoUrl: "https://github.com/facebookresearch/co-tracker",
276
+ filter: false,
277
+ countDownloads: `path_extension:"pth"`,
278
+ },
225
279
  colpali: {
226
280
  prettyLabel: "ColPali",
227
281
  repoName: "ColPali",
@@ -293,6 +347,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
293
347
  snippets: snippets.dia,
294
348
  filter: false,
295
349
  },
350
+ dia2: {
351
+ prettyLabel: "Dia2",
352
+ repoName: "Dia2",
353
+ repoUrl: "https://github.com/nari-labs/dia2",
354
+ snippets: snippets.dia2,
355
+ filter: false,
356
+ },
296
357
  "diff-interpretation-tuning": {
297
358
  prettyLabel: "Diff Interpretation Tuning",
298
359
  repoName: "Diff Interpretation Tuning",
@@ -322,44 +383,18 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
322
383
  repoUrl: "https://github.com/argmaxinc/DiffusionKit",
323
384
  snippets: snippets.diffusionkit,
324
385
  },
386
+ "docking-at-home": {
387
+ prettyLabel: "Docking@Home",
388
+ repoName: "Docking@Home",
389
+ repoUrl: "https://huggingface.co/OpenPeerAI/DockingAtHOME",
390
+ filter: false,
391
+ countDownloads: `path:"setup.py"`,
392
+ },
325
393
  doctr: {
326
394
  prettyLabel: "docTR",
327
395
  repoName: "doctr",
328
396
  repoUrl: "https://github.com/mindee/doctr",
329
397
  },
330
- cartesia_pytorch: {
331
- prettyLabel: "Cartesia Pytorch",
332
- repoName: "Cartesia Pytorch",
333
- repoUrl: "https://github.com/cartesia-ai/cartesia_pytorch",
334
- snippets: snippets.cartesia_pytorch,
335
- },
336
- cartesia_mlx: {
337
- prettyLabel: "Cartesia MLX",
338
- repoName: "Cartesia MLX",
339
- repoUrl: "https://github.com/cartesia-ai/cartesia_mlx",
340
- snippets: snippets.cartesia_mlx,
341
- },
342
- clipscope: {
343
- prettyLabel: "clipscope",
344
- repoName: "clipscope",
345
- repoUrl: "https://github.com/Lewington-pitsos/clipscope",
346
- filter: false,
347
- countDownloads: `path_extension:"pt"`,
348
- },
349
- cosyvoice: {
350
- prettyLabel: "CosyVoice",
351
- repoName: "CosyVoice",
352
- repoUrl: "https://github.com/FunAudioLLM/CosyVoice",
353
- filter: false,
354
- countDownloads: `path_extension:"onnx" OR path_extension:"pt"`,
355
- },
356
- cotracker: {
357
- prettyLabel: "CoTracker",
358
- repoName: "CoTracker",
359
- repoUrl: "https://github.com/facebookresearch/co-tracker",
360
- filter: false,
361
- countDownloads: `path_extension:"pth"`,
362
- },
363
398
  edsnlp: {
364
399
  prettyLabel: "EDS-NLP",
365
400
  repoName: "edsnlp",
package/src/pipelines.ts CHANGED
@@ -557,6 +557,14 @@ export const PIPELINE_DATA = {
557
557
  name: "Image-Text-to-Text",
558
558
  modality: "multimodal",
559
559
  },
560
+ "image-text-to-image": {
561
+ name: "Image-Text-to-Image",
562
+ modality: "multimodal",
563
+ },
564
+ "image-text-to-video": {
565
+ name: "Image-Text-to-Video",
566
+ modality: "multimodal",
567
+ },
560
568
  "visual-question-answering": {
561
569
  name: "Visual Question Answering",
562
570
  subtasks: [
@@ -94,6 +94,16 @@ const inputsImageToVideo = () => `{
94
94
  "prompt": "The cat starts to dance"
95
95
  }`;
96
96
 
97
+ const inputsImageTextToImage = () => `{
98
+ "image": "cat.png",
99
+ "prompt": "Turn the cat into a tiger."
100
+ }`;
101
+
102
+ const inputsImageTextToVideo = () => `{
103
+ "image": "cat.png",
104
+ "prompt": "The cat starts to dance"
105
+ }`;
106
+
97
107
  const inputsImageSegmentation = () => `"cats.jpg"`;
98
108
 
99
109
  const inputsObjectDetection = () => `"cats.jpg"`;
@@ -130,6 +140,8 @@ const modelInputSnippets: {
130
140
  "image-to-text": inputsImageToText,
131
141
  "image-to-image": inputsImageToImage,
132
142
  "image-to-video": inputsImageToVideo,
143
+ "image-text-to-image": inputsImageTextToImage,
144
+ "image-text-to-video": inputsImageTextToVideo,
133
145
  "image-segmentation": inputsImageSegmentation,
134
146
  "object-detection": inputsObjectDetection,
135
147
  "question-answering": inputsQuestionAnswering,
@@ -0,0 +1,73 @@
1
+ ## Use Cases
2
+
3
+ ### Instruction-based Image Editing
4
+
5
+ Image-text-to-image models can be used to edit images based on natural language instructions. For example, you can provide an image of a summer landscape and the instruction "Make it winter, add snow" to generate a winter version of the same scene.
6
+
7
+ ### Style Transfer
8
+
9
+ These models can apply artistic styles or transformations to images based on text descriptions. For instance, you can transform a photo into a painting style by providing prompts like "Make it look like a Van Gogh painting" or "Convert to watercolor style."
10
+
11
+ ### Image Variations
12
+
13
+ Generate variations of an existing image by providing different text prompts. This is useful for creative workflows where you want to explore different versions of the same image with specific modifications.
14
+
15
+ ### Guided Image Generation
16
+
17
+ Use a reference image along with text prompts to guide the generation process. This allows for more controlled image generation compared to text-to-image models alone, as the reference image provides structural guidance.
18
+
19
+ ### Image Inpainting and Outpainting
20
+
21
+ Fill in missing or masked parts of an image based on text descriptions, or extend an image beyond its original boundaries with text-guided generation.
22
+
23
+ ## Task Variants
24
+
25
+ ### Instruction-based Editing
26
+
27
+ Models that follow natural language instructions to edit images, which can perform complex edits like object removal, color changes, and compositional modifications.
28
+
29
+ ### Reference-guided Generation
30
+
31
+ Models that use a reference image to guide the generation process while incorporating text prompts to control specific attributes or modifications.
32
+
33
+ ### Conditional Image-to-Image
34
+
35
+ Models that perform specific transformations based on text conditions, such as changing weather conditions, time of day, or seasonal variations.
36
+
37
+ ## Inference
38
+
39
+ You can use the Diffusers library to interact with image-text-to-image models.
40
+
41
+ ```python
42
+ import torch
43
+ from diffusers import Flux2Pipeline
44
+ from diffusers.utils import load_image
45
+
46
+ repo_id = "black-forest-labs/FLUX.2-dev"
47
+ device = "cuda:0"
48
+ torch_dtype = torch.bfloat16
49
+
50
+ pipe = Flux2Pipeline.from_pretrained(
51
+ repo_id, torch_dtype=torch_dtype
52
+ )
53
+ pipe.enable_model_cpu_offload() #no need to do cpu offload for >80G VRAM carts like H200, B200, etc. and do a `pipe.to(device)` instead
54
+
55
+ prompt = "Realistic macro photograph of a hermit crab using a soda can as its shell, partially emerging from the can, captured with sharp detail and natural colors, on a sunlit beach with soft shadows and a shallow depth of field, with blurred ocean waves in the background. The can has the text `BFL Diffusers` on it and it has a color gradient that start with #FF5733 at the top and transitions to #33FF57 at the bottom."
56
+
57
+ #cat_image = load_image("https://huggingface.co/spaces/zerogpu-aoti/FLUX.1-Kontext-Dev-fp8-dynamic/resolve/main/cat.png")
58
+ image = pipe(
59
+ prompt=prompt,
60
+ #image=[cat_image] #multi-image input
61
+ generator=torch.Generator(device=device).manual_seed(42),
62
+ num_inference_steps=50,
63
+ guidance_scale=4,
64
+ ).images[0]
65
+
66
+ image.save("flux2_output.png")
67
+ ```
68
+
69
+ ## Useful Resources
70
+
71
+ - [FLUX.2 Model Card](https://huggingface.co/black-forest-labs/FLUX.2-dev)
72
+ - [Diffusers documentation on Image-to-Image](https://huggingface.co/docs/diffusers/using-diffusers/img2img)
73
+ - [ControlNet for Conditional Image Generation](https://huggingface.co/docs/diffusers/using-diffusers/controlnet)
@@ -0,0 +1,54 @@
1
+ import type { TaskDataCustom } from "../index.js";
2
+
3
+ const taskData: TaskDataCustom = {
4
+ datasets: [],
5
+ demo: {
6
+ inputs: [
7
+ {
8
+ filename: "image-text-to-image-input.jpeg",
9
+ type: "img",
10
+ },
11
+ {
12
+ label: "Input",
13
+ content: "A city above clouds, pastel colors, Victorian style",
14
+ type: "text",
15
+ },
16
+ ],
17
+ outputs: [
18
+ {
19
+ filename: "image-text-to-image-output.png",
20
+ type: "img",
21
+ },
22
+ ],
23
+ },
24
+ metrics: [
25
+ {
26
+ description:
27
+ "The Fréchet Inception Distance (FID) calculates the distance between distributions between synthetic and real samples. A lower FID score indicates better similarity between the distributions of real and generated images.",
28
+ id: "FID",
29
+ },
30
+ {
31
+ description:
32
+ "CLIP Score measures the similarity between the generated image and the text prompt using CLIP embeddings. A higher score indicates better alignment with the text prompt.",
33
+ id: "CLIP",
34
+ },
35
+ ],
36
+ models: [
37
+ {
38
+ description: "A powerful model for image-text-to-image generation.",
39
+ id: "black-forest-labs/FLUX.2-dev",
40
+ },
41
+ ],
42
+ spaces: [
43
+ {
44
+ description: "An application for image-text-to-image generation.",
45
+ id: "black-forest-labs/FLUX.2-dev",
46
+ },
47
+ ],
48
+ summary:
49
+ "Image-text-to-image models take an image and a text prompt as input and generate a new image based on the reference image and text instructions. These models are useful for image editing, style transfer, image variations, and guided image generation tasks.",
50
+ widgetModels: ["black-forest-labs/FLUX.2-dev"],
51
+ youtubeId: undefined,
52
+ };
53
+
54
+ export default taskData;
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Inference code generated from the JSON schema spec in ./spec
3
+ *
4
+ * Using src/scripts/inference-codegen
5
+ */
6
+ /**
7
+ * Inputs for Image Text To Image inference. Either inputs (image) or prompt (in parameters)
8
+ * must be provided, or both.
9
+ */
10
+ export interface ImageTextToImageInput {
11
+ /**
12
+ * The input image data as a base64-encoded string. If no `parameters` are provided, you can
13
+ * also provide the image data as a raw bytes payload. Either this or prompt must be
14
+ * provided.
15
+ */
16
+ inputs?: Blob;
17
+ /**
18
+ * Additional inference parameters for Image Text To Image
19
+ */
20
+ parameters?: ImageTextToImageParameters;
21
+ [property: string]: unknown;
22
+ }
23
+ /**
24
+ * Additional inference parameters for Image Text To Image
25
+ */
26
+ export interface ImageTextToImageParameters {
27
+ /**
28
+ * For diffusion models. A higher guidance scale value encourages the model to generate
29
+ * images closely linked to the text prompt at the expense of lower image quality.
30
+ */
31
+ guidance_scale?: number;
32
+ /**
33
+ * One prompt to guide what NOT to include in image generation.
34
+ */
35
+ negative_prompt?: string;
36
+ /**
37
+ * For diffusion models. The number of denoising steps. More denoising steps usually lead to
38
+ * a higher quality image at the expense of slower inference.
39
+ */
40
+ num_inference_steps?: number;
41
+ /**
42
+ * The text prompt to guide the image generation. Either this or inputs (image) must be
43
+ * provided.
44
+ */
45
+ prompt?: string;
46
+ /**
47
+ * Seed for the random number generator.
48
+ */
49
+ seed?: number;
50
+ /**
51
+ * The size in pixels of the output image. This parameter is only supported by some
52
+ * providers and for specific models. It will be ignored when unsupported.
53
+ */
54
+ target_size?: TargetSize;
55
+ [property: string]: unknown;
56
+ }
57
+ /**
58
+ * The size in pixels of the output image. This parameter is only supported by some
59
+ * providers and for specific models. It will be ignored when unsupported.
60
+ */
61
+ export interface TargetSize {
62
+ height: number;
63
+ width: number;
64
+ [property: string]: unknown;
65
+ }
66
+ /**
67
+ * Outputs of inference for the Image Text To Image task
68
+ */
69
+ export interface ImageTextToImageOutput {
70
+ /**
71
+ * The generated image returned as raw bytes in the payload.
72
+ */
73
+ image: unknown;
74
+ [property: string]: unknown;
75
+ }
@@ -0,0 +1,59 @@
1
+ {
2
+ "$id": "/inference/schemas/image-text-to-image/input.json",
3
+ "$schema": "http://json-schema.org/draft-06/schema#",
4
+ "description": "Inputs for Image Text To Image inference. Either inputs (image) or prompt (in parameters) must be provided, or both.",
5
+ "title": "ImageTextToImageInput",
6
+ "type": "object",
7
+ "properties": {
8
+ "inputs": {
9
+ "type": "string",
10
+ "description": "The input image data as a base64-encoded string. If no `parameters` are provided, you can also provide the image data as a raw bytes payload. Either this or prompt must be provided.",
11
+ "comment": "type=binary"
12
+ },
13
+ "parameters": {
14
+ "description": "Additional inference parameters for Image Text To Image",
15
+ "$ref": "#/$defs/ImageTextToImageParameters"
16
+ }
17
+ },
18
+ "$defs": {
19
+ "ImageTextToImageParameters": {
20
+ "title": "ImageTextToImageParameters",
21
+ "type": "object",
22
+ "properties": {
23
+ "prompt": {
24
+ "type": "string",
25
+ "description": "The text prompt to guide the image generation. Either this or inputs (image) must be provided."
26
+ },
27
+ "guidance_scale": {
28
+ "type": "number",
29
+ "description": "For diffusion models. A higher guidance scale value encourages the model to generate images closely linked to the text prompt at the expense of lower image quality."
30
+ },
31
+ "negative_prompt": {
32
+ "type": "string",
33
+ "description": "One prompt to guide what NOT to include in image generation."
34
+ },
35
+ "num_inference_steps": {
36
+ "type": "integer",
37
+ "description": "For diffusion models. The number of denoising steps. More denoising steps usually lead to a higher quality image at the expense of slower inference."
38
+ },
39
+ "target_size": {
40
+ "type": "object",
41
+ "description": "The size in pixels of the output image. This parameter is only supported by some providers and for specific models. It will be ignored when unsupported.",
42
+ "properties": {
43
+ "width": {
44
+ "type": "integer"
45
+ },
46
+ "height": {
47
+ "type": "integer"
48
+ }
49
+ },
50
+ "required": ["width", "height"]
51
+ },
52
+ "seed": {
53
+ "type": "integer",
54
+ "description": "Seed for the random number generator."
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }