@huggingface/tasks 0.11.13 → 0.12.1

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.
package/dist/index.cjs CHANGED
@@ -1406,6 +1406,12 @@ var PIPELINE_DATA = {
1406
1406
  color: "red",
1407
1407
  hideInDatasets: true
1408
1408
  },
1409
+ "any-to-any": {
1410
+ name: "Any-to-Any",
1411
+ modality: "multimodal",
1412
+ color: "yellow",
1413
+ hideInDatasets: true
1414
+ },
1409
1415
  other: {
1410
1416
  name: "Other",
1411
1417
  modality: "other",
@@ -2069,7 +2075,7 @@ var taskData9 = {
2069
2075
  id: "timbrooks/instruct-pix2pix"
2070
2076
  }
2071
2077
  ],
2072
- summary: "Image-to-image is the task of transforming a source image to match the characteristics of a target image or a target image domain. Any image manipulation and enhancement is possible with image to image models.",
2078
+ summary: "Image-to-image is the task of transforming an input image through a variety of possible manipulations and enhancements, such as super-resolution, image inpainting, colorization, and more.",
2073
2079
  widgetModels: ["lllyasviel/sd-controlnet-canny"],
2074
2080
  youtubeId: ""
2075
2081
  };
@@ -4264,7 +4270,8 @@ var TASKS_MODEL_LIBRARIES = {
4264
4270
  "zero-shot-image-classification": ["transformers", "transformers.js"],
4265
4271
  "zero-shot-object-detection": ["transformers", "transformers.js"],
4266
4272
  "text-to-3d": ["diffusers"],
4267
- "image-to-3d": ["diffusers"]
4273
+ "image-to-3d": ["diffusers"],
4274
+ "any-to-any": ["transformers"]
4268
4275
  };
4269
4276
  function getData(type, partialTaskData = data_default16) {
4270
4277
  return {
@@ -4275,6 +4282,7 @@ function getData(type, partialTaskData = data_default16) {
4275
4282
  };
4276
4283
  }
4277
4284
  var TASKS_DATA = {
4285
+ "any-to-any": getData("any-to-any", data_default16),
4278
4286
  "audio-classification": getData("audio-classification", data_default),
4279
4287
  "audio-to-audio": getData("audio-to-audio", data_default2),
4280
4288
  "automatic-speech-recognition": getData("automatic-speech-recognition", data_default3),
@@ -6760,6 +6768,24 @@ var SKUS = {
6760
6768
  };
6761
6769
 
6762
6770
  // src/local-apps.ts
6771
+ function isGgufModel(model) {
6772
+ return model.tags.includes("gguf");
6773
+ }
6774
+ function isAwqModel(model) {
6775
+ return model.config?.quantization_config?.quant_method === "awq";
6776
+ }
6777
+ function isGptqModel(model) {
6778
+ return model.config?.quantization_config?.quant_method === "gptq";
6779
+ }
6780
+ function isAqlmModel(model) {
6781
+ return model.config?.quantization_config?.quant_method === "aqlm";
6782
+ }
6783
+ function isMarlinModel(model) {
6784
+ return model.config?.quantization_config?.quant_method === "marlin";
6785
+ }
6786
+ function isTransformersModel(model) {
6787
+ return model.tags.includes("transformers");
6788
+ }
6763
6789
  function isLlamaCppGgufModel(model) {
6764
6790
  return !!model.gguf?.context_length;
6765
6791
  }
@@ -6819,6 +6845,46 @@ var snippetLocalAI = (model, filepath) => {
6819
6845
  }
6820
6846
  ];
6821
6847
  };
6848
+ var snippetVllm = (model) => {
6849
+ const runCommand = [
6850
+ "",
6851
+ "# Call the server using curl:",
6852
+ `curl -X POST "http://localhost:8000/v1/chat/completions" \\ `,
6853
+ ` -H "Content-Type: application/json" \\ `,
6854
+ ` --data '{`,
6855
+ ` "model": "${model.id}"`,
6856
+ ` "messages": [`,
6857
+ ` {"role": "user", "content": "Hello!"}`,
6858
+ ` ]`,
6859
+ ` }'`
6860
+ ];
6861
+ return [
6862
+ {
6863
+ title: "Install from pip",
6864
+ setup: ["# Install vLLM from pip:", "pip install vllm"].join("\n"),
6865
+ content: ["# Load and run the model:", `vllm serve "${model.id}"`, ...runCommand].join("\n")
6866
+ },
6867
+ {
6868
+ title: "Use Docker images",
6869
+ setup: [
6870
+ "# Deploy with docker on Linux:",
6871
+ `docker run --runtime nvidia --gpus all \\`,
6872
+ ` --name my_vllm_container \\`,
6873
+ ` -v ~/.cache/huggingface:/root/.cache/huggingface \\`,
6874
+ ` --env "HUGGING_FACE_HUB_TOKEN=<secret>" \\`,
6875
+ ` -p 8000:8000 \\`,
6876
+ ` --ipc=host \\`,
6877
+ ` vllm/vllm-openai:latest \\`,
6878
+ ` --model ${model.id}`
6879
+ ].join("\n"),
6880
+ content: [
6881
+ "# Load and run the model:",
6882
+ `docker exec -it my_vllm_container bash -c "vllm serve ${model.id}"`,
6883
+ ...runCommand
6884
+ ].join("\n")
6885
+ }
6886
+ ];
6887
+ };
6822
6888
  var LOCAL_APPS = {
6823
6889
  "llama.cpp": {
6824
6890
  prettyLabel: "llama.cpp",
@@ -6827,6 +6893,13 @@ var LOCAL_APPS = {
6827
6893
  displayOnModelPage: isLlamaCppGgufModel,
6828
6894
  snippet: snippetLlamacpp
6829
6895
  },
6896
+ vllm: {
6897
+ prettyLabel: "vLLM",
6898
+ docsUrl: "https://docs.vllm.ai",
6899
+ mainTask: "text-generation",
6900
+ displayOnModelPage: (model) => isAwqModel(model) || isGptqModel(model) || isAqlmModel(model) || isMarlinModel(model) || isGgufModel(model) || isTransformersModel(model),
6901
+ snippet: snippetVllm
6902
+ },
6830
6903
  lmstudio: {
6831
6904
  prettyLabel: "LM Studio",
6832
6905
  docsUrl: "https://lmstudio.ai",
package/dist/index.js CHANGED
@@ -1368,6 +1368,12 @@ var PIPELINE_DATA = {
1368
1368
  color: "red",
1369
1369
  hideInDatasets: true
1370
1370
  },
1371
+ "any-to-any": {
1372
+ name: "Any-to-Any",
1373
+ modality: "multimodal",
1374
+ color: "yellow",
1375
+ hideInDatasets: true
1376
+ },
1371
1377
  other: {
1372
1378
  name: "Other",
1373
1379
  modality: "other",
@@ -2031,7 +2037,7 @@ var taskData9 = {
2031
2037
  id: "timbrooks/instruct-pix2pix"
2032
2038
  }
2033
2039
  ],
2034
- summary: "Image-to-image is the task of transforming a source image to match the characteristics of a target image or a target image domain. Any image manipulation and enhancement is possible with image to image models.",
2040
+ summary: "Image-to-image is the task of transforming an input image through a variety of possible manipulations and enhancements, such as super-resolution, image inpainting, colorization, and more.",
2035
2041
  widgetModels: ["lllyasviel/sd-controlnet-canny"],
2036
2042
  youtubeId: ""
2037
2043
  };
@@ -4226,7 +4232,8 @@ var TASKS_MODEL_LIBRARIES = {
4226
4232
  "zero-shot-image-classification": ["transformers", "transformers.js"],
4227
4233
  "zero-shot-object-detection": ["transformers", "transformers.js"],
4228
4234
  "text-to-3d": ["diffusers"],
4229
- "image-to-3d": ["diffusers"]
4235
+ "image-to-3d": ["diffusers"],
4236
+ "any-to-any": ["transformers"]
4230
4237
  };
4231
4238
  function getData(type, partialTaskData = data_default16) {
4232
4239
  return {
@@ -4237,6 +4244,7 @@ function getData(type, partialTaskData = data_default16) {
4237
4244
  };
4238
4245
  }
4239
4246
  var TASKS_DATA = {
4247
+ "any-to-any": getData("any-to-any", data_default16),
4240
4248
  "audio-classification": getData("audio-classification", data_default),
4241
4249
  "audio-to-audio": getData("audio-to-audio", data_default2),
4242
4250
  "automatic-speech-recognition": getData("automatic-speech-recognition", data_default3),
@@ -6722,6 +6730,24 @@ var SKUS = {
6722
6730
  };
6723
6731
 
6724
6732
  // src/local-apps.ts
6733
+ function isGgufModel(model) {
6734
+ return model.tags.includes("gguf");
6735
+ }
6736
+ function isAwqModel(model) {
6737
+ return model.config?.quantization_config?.quant_method === "awq";
6738
+ }
6739
+ function isGptqModel(model) {
6740
+ return model.config?.quantization_config?.quant_method === "gptq";
6741
+ }
6742
+ function isAqlmModel(model) {
6743
+ return model.config?.quantization_config?.quant_method === "aqlm";
6744
+ }
6745
+ function isMarlinModel(model) {
6746
+ return model.config?.quantization_config?.quant_method === "marlin";
6747
+ }
6748
+ function isTransformersModel(model) {
6749
+ return model.tags.includes("transformers");
6750
+ }
6725
6751
  function isLlamaCppGgufModel(model) {
6726
6752
  return !!model.gguf?.context_length;
6727
6753
  }
@@ -6781,6 +6807,46 @@ var snippetLocalAI = (model, filepath) => {
6781
6807
  }
6782
6808
  ];
6783
6809
  };
6810
+ var snippetVllm = (model) => {
6811
+ const runCommand = [
6812
+ "",
6813
+ "# Call the server using curl:",
6814
+ `curl -X POST "http://localhost:8000/v1/chat/completions" \\ `,
6815
+ ` -H "Content-Type: application/json" \\ `,
6816
+ ` --data '{`,
6817
+ ` "model": "${model.id}"`,
6818
+ ` "messages": [`,
6819
+ ` {"role": "user", "content": "Hello!"}`,
6820
+ ` ]`,
6821
+ ` }'`
6822
+ ];
6823
+ return [
6824
+ {
6825
+ title: "Install from pip",
6826
+ setup: ["# Install vLLM from pip:", "pip install vllm"].join("\n"),
6827
+ content: ["# Load and run the model:", `vllm serve "${model.id}"`, ...runCommand].join("\n")
6828
+ },
6829
+ {
6830
+ title: "Use Docker images",
6831
+ setup: [
6832
+ "# Deploy with docker on Linux:",
6833
+ `docker run --runtime nvidia --gpus all \\`,
6834
+ ` --name my_vllm_container \\`,
6835
+ ` -v ~/.cache/huggingface:/root/.cache/huggingface \\`,
6836
+ ` --env "HUGGING_FACE_HUB_TOKEN=<secret>" \\`,
6837
+ ` -p 8000:8000 \\`,
6838
+ ` --ipc=host \\`,
6839
+ ` vllm/vllm-openai:latest \\`,
6840
+ ` --model ${model.id}`
6841
+ ].join("\n"),
6842
+ content: [
6843
+ "# Load and run the model:",
6844
+ `docker exec -it my_vllm_container bash -c "vllm serve ${model.id}"`,
6845
+ ...runCommand
6846
+ ].join("\n")
6847
+ }
6848
+ ];
6849
+ };
6784
6850
  var LOCAL_APPS = {
6785
6851
  "llama.cpp": {
6786
6852
  prettyLabel: "llama.cpp",
@@ -6789,6 +6855,13 @@ var LOCAL_APPS = {
6789
6855
  displayOnModelPage: isLlamaCppGgufModel,
6790
6856
  snippet: snippetLlamacpp
6791
6857
  },
6858
+ vllm: {
6859
+ prettyLabel: "vLLM",
6860
+ docsUrl: "https://docs.vllm.ai",
6861
+ mainTask: "text-generation",
6862
+ displayOnModelPage: (model) => isAwqModel(model) || isGptqModel(model) || isAqlmModel(model) || isMarlinModel(model) || isGgufModel(model) || isTransformersModel(model),
6863
+ snippet: snippetVllm
6864
+ },
6792
6865
  lmstudio: {
6793
6866
  prettyLabel: "LM Studio",
6794
6867
  docsUrl: "https://lmstudio.ai",
@@ -71,6 +71,13 @@ export declare const LOCAL_APPS: {
71
71
  displayOnModelPage: typeof isLlamaCppGgufModel;
72
72
  snippet: (model: ModelData, filepath?: string) => LocalAppSnippet[];
73
73
  };
74
+ vllm: {
75
+ prettyLabel: string;
76
+ docsUrl: string;
77
+ mainTask: "text-generation";
78
+ displayOnModelPage: (model: ModelData) => boolean;
79
+ snippet: (model: ModelData) => LocalAppSnippet[];
80
+ };
74
81
  lmstudio: {
75
82
  prettyLabel: string;
76
83
  docsUrl: string;
@@ -1 +1 @@
1
- {"version":3,"file":"local-apps.d.ts","sourceRoot":"","sources":["../../src/local-apps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACtB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,kBAAkB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAAO,CAAC;CAClD,GAAG,CACD;IACA;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,GAAG,CAAC;CACtD,GACD;IACA;;;OAGG;IACH,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,MAAM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M,KAAK,GAAG,CAAC;CACtD,GACD;IACA;;;OAGG;IACH,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,EAAE,GAAG,eAAe,GAAG,eAAe,EAAE,CAAC;CACzG,CACH,CAAC;AA0BF,iBAAS,mBAAmB,CAAC,KAAK,EAAE,SAAS,WAE5C;AAuGD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU;;;;;;yBAhHS,SAAS,aAAa,MAAM,KAAG,eAAe,EAAE;;;;;;oCA4HlD,SAAS;yBAhEX,SAAS,KAAG,eAAe,EAAE;;;;;;;;;;;;;;yBAvB1B,SAAS,aAAa,MAAM,KAAG,eAAe,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6M3C,CAAC;AAErC,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,UAAU,CAAC"}
@@ -37,6 +37,10 @@ export interface ModelData {
37
37
  bits?: number;
38
38
  load_in_4bit?: boolean;
39
39
  load_in_8bit?: boolean;
40
+ /**
41
+ * awq, gptq, aqlm, marlin, … Used by vLLM
42
+ */
43
+ quant_method?: string;
40
44
  };
41
45
  tokenizer_config?: TokenizerConfig;
42
46
  adapter_transformers?: {
@@ -1 +1 @@
1
- {"version":3,"file":"model-data.d.ts","sourceRoot":"","sources":["../../src/model-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,SAAS;IACzB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,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AY,GAAG,SAAS,CAAC;IACxC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,aAAa,EAAE,GAAG,SAAS,CAAC;IACzC;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE;QACV,SAAS,CAAC,EACP,OAAO,GACP;YACA,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;SACpC,CAAC;QACL,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;KAC/B,CAAC;IACF;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE;QACb,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACnC,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,OAAO,CAAC;KACjB,CAAC;IACF,IAAI,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,cAAc,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;CACF;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -403,6 +403,12 @@ export declare const PIPELINE_DATA: {
403
403
  color: "red";
404
404
  hideInDatasets: true;
405
405
  };
406
+ "any-to-any": {
407
+ name: string;
408
+ modality: "multimodal";
409
+ color: "yellow";
410
+ hideInDatasets: true;
411
+ };
406
412
  other: {
407
413
  name: string;
408
414
  modality: "other";
@@ -413,7 +419,7 @@ export declare const PIPELINE_DATA: {
413
419
  };
414
420
  export type PipelineType = keyof typeof PIPELINE_DATA;
415
421
  export type WidgetType = PipelineType | "conversational";
416
- export declare const PIPELINE_TYPES: ("other" | "text-classification" | "token-classification" | "table-question-answering" | "question-answering" | "zero-shot-classification" | "translation" | "summarization" | "feature-extraction" | "text-generation" | "text2text-generation" | "fill-mask" | "sentence-similarity" | "text-to-speech" | "text-to-audio" | "automatic-speech-recognition" | "audio-to-audio" | "audio-classification" | "voice-activity-detection" | "depth-estimation" | "image-classification" | "object-detection" | "image-segmentation" | "text-to-image" | "image-to-text" | "image-to-image" | "image-to-video" | "unconditional-image-generation" | "video-classification" | "reinforcement-learning" | "robotics" | "tabular-classification" | "tabular-regression" | "tabular-to-text" | "table-to-text" | "multiple-choice" | "text-retrieval" | "time-series-forecasting" | "text-to-video" | "image-text-to-text" | "visual-question-answering" | "document-question-answering" | "zero-shot-image-classification" | "graph-ml" | "mask-generation" | "zero-shot-object-detection" | "text-to-3d" | "image-to-3d" | "image-feature-extraction" | "video-text-to-text" | "keypoint-detection")[];
422
+ export declare const PIPELINE_TYPES: ("other" | "text-classification" | "token-classification" | "table-question-answering" | "question-answering" | "zero-shot-classification" | "translation" | "summarization" | "feature-extraction" | "text-generation" | "text2text-generation" | "fill-mask" | "sentence-similarity" | "text-to-speech" | "text-to-audio" | "automatic-speech-recognition" | "audio-to-audio" | "audio-classification" | "voice-activity-detection" | "depth-estimation" | "image-classification" | "object-detection" | "image-segmentation" | "text-to-image" | "image-to-text" | "image-to-image" | "image-to-video" | "unconditional-image-generation" | "video-classification" | "reinforcement-learning" | "robotics" | "tabular-classification" | "tabular-regression" | "tabular-to-text" | "table-to-text" | "multiple-choice" | "text-retrieval" | "time-series-forecasting" | "text-to-video" | "image-text-to-text" | "visual-question-answering" | "document-question-answering" | "zero-shot-image-classification" | "graph-ml" | "mask-generation" | "zero-shot-object-detection" | "text-to-3d" | "image-to-3d" | "image-feature-extraction" | "video-text-to-text" | "keypoint-detection" | "any-to-any")[];
417
423
  export declare const SUBTASK_TYPES: string[];
418
- export declare const PIPELINE_TYPES_SET: Set<"other" | "text-classification" | "token-classification" | "table-question-answering" | "question-answering" | "zero-shot-classification" | "translation" | "summarization" | "feature-extraction" | "text-generation" | "text2text-generation" | "fill-mask" | "sentence-similarity" | "text-to-speech" | "text-to-audio" | "automatic-speech-recognition" | "audio-to-audio" | "audio-classification" | "voice-activity-detection" | "depth-estimation" | "image-classification" | "object-detection" | "image-segmentation" | "text-to-image" | "image-to-text" | "image-to-image" | "image-to-video" | "unconditional-image-generation" | "video-classification" | "reinforcement-learning" | "robotics" | "tabular-classification" | "tabular-regression" | "tabular-to-text" | "table-to-text" | "multiple-choice" | "text-retrieval" | "time-series-forecasting" | "text-to-video" | "image-text-to-text" | "visual-question-answering" | "document-question-answering" | "zero-shot-image-classification" | "graph-ml" | "mask-generation" | "zero-shot-object-detection" | "text-to-3d" | "image-to-3d" | "image-feature-extraction" | "video-text-to-text" | "keypoint-detection">;
424
+ export declare const PIPELINE_TYPES_SET: Set<"other" | "text-classification" | "token-classification" | "table-question-answering" | "question-answering" | "zero-shot-classification" | "translation" | "summarization" | "feature-extraction" | "text-generation" | "text2text-generation" | "fill-mask" | "sentence-similarity" | "text-to-speech" | "text-to-audio" | "automatic-speech-recognition" | "audio-to-audio" | "audio-classification" | "voice-activity-detection" | "depth-estimation" | "image-classification" | "object-detection" | "image-segmentation" | "text-to-image" | "image-to-text" | "image-to-image" | "image-to-video" | "unconditional-image-generation" | "video-classification" | "reinforcement-learning" | "robotics" | "tabular-classification" | "tabular-regression" | "tabular-to-text" | "table-to-text" | "multiple-choice" | "text-retrieval" | "time-series-forecasting" | "text-to-video" | "image-text-to-text" | "visual-question-answering" | "document-question-answering" | "zero-shot-image-classification" | "graph-ml" | "mask-generation" | "zero-shot-object-detection" | "text-to-3d" | "image-to-3d" | "image-feature-extraction" | "video-text-to-text" | "keypoint-detection" | "any-to-any">;
419
425
  //# sourceMappingURL=pipelines.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pipelines.d.ts","sourceRoot":"","sources":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,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"}
@@ -24,8 +24,8 @@ export interface TextToImageInput {
24
24
  */
25
25
  export interface TextToImageParameters {
26
26
  /**
27
- * For diffusion models. A higher guidance scale value encourages the model to generate
28
- * images closely linked to the text prompt at the expense of lower image quality.
27
+ * A higher guidance scale value encourages the model to generate images closely linked to
28
+ * the text prompt, but values too high may cause saturation and other artifacts.
29
29
  */
30
30
  guidance_scale?: number;
31
31
  /**
@@ -33,14 +33,18 @@ export interface TextToImageParameters {
33
33
  */
34
34
  negative_prompt?: string[];
35
35
  /**
36
- * For diffusion models. The number of denoising steps. More denoising steps usually lead to
37
- * a higher quality image at the expense of slower inference.
36
+ * The number of denoising steps. More denoising steps usually lead to a higher quality
37
+ * image at the expense of slower inference.
38
38
  */
39
39
  num_inference_steps?: number;
40
40
  /**
41
- * For diffusion models. Override the scheduler with a compatible one
41
+ * Override the scheduler with a compatible one.
42
42
  */
43
43
  scheduler?: string;
44
+ /**
45
+ * Seed for the random number generator.
46
+ */
47
+ seed?: number;
44
48
  /**
45
49
  * The size in pixel of the output image
46
50
  */
@@ -1 +1 @@
1
- {"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/text-to-image/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACrC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B"}
1
+ {"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/text-to-image/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACrC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@huggingface/tasks",
3
3
  "packageManager": "pnpm@8.10.5",
4
- "version": "0.11.13",
4
+ "version": "0.12.1",
5
5
  "description": "List of ML tasks for huggingface.co/tasks",
6
6
  "repository": "https://github.com/huggingface/huggingface.js.git",
7
7
  "publishConfig": {
package/src/local-apps.ts CHANGED
@@ -58,11 +58,30 @@ export type LocalApp = {
58
58
  }
59
59
  );
60
60
 
61
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
62
- function isGgufModel(model: ModelData) {
61
+ function isGgufModel(model: ModelData): boolean {
63
62
  return model.tags.includes("gguf");
64
63
  }
65
64
 
65
+ function isAwqModel(model: ModelData): boolean {
66
+ return model.config?.quantization_config?.quant_method === "awq";
67
+ }
68
+
69
+ function isGptqModel(model: ModelData): boolean {
70
+ return model.config?.quantization_config?.quant_method === "gptq";
71
+ }
72
+
73
+ function isAqlmModel(model: ModelData): boolean {
74
+ return model.config?.quantization_config?.quant_method === "aqlm";
75
+ }
76
+
77
+ function isMarlinModel(model: ModelData): boolean {
78
+ return model.config?.quantization_config?.quant_method === "marlin";
79
+ }
80
+
81
+ function isTransformersModel(model: ModelData): boolean {
82
+ return model.tags.includes("transformers");
83
+ }
84
+
66
85
  function isLlamaCppGgufModel(model: ModelData) {
67
86
  return !!model.gguf?.context_length;
68
87
  }
@@ -127,6 +146,47 @@ const snippetLocalAI = (model: ModelData, filepath?: string): LocalAppSnippet[]
127
146
  ];
128
147
  };
129
148
 
149
+ const snippetVllm = (model: ModelData): LocalAppSnippet[] => {
150
+ const runCommand = [
151
+ "",
152
+ "# Call the server using curl:",
153
+ `curl -X POST "http://localhost:8000/v1/chat/completions" \\ `,
154
+ ` -H "Content-Type: application/json" \\ `,
155
+ ` --data '{`,
156
+ ` "model": "${model.id}"`,
157
+ ` "messages": [`,
158
+ ` {"role": "user", "content": "Hello!"}`,
159
+ ` ]`,
160
+ ` }'`,
161
+ ];
162
+ return [
163
+ {
164
+ title: "Install from pip",
165
+ setup: ["# Install vLLM from pip:", "pip install vllm"].join("\n"),
166
+ content: ["# Load and run the model:", `vllm serve "${model.id}"`, ...runCommand].join("\n"),
167
+ },
168
+ {
169
+ title: "Use Docker images",
170
+ setup: [
171
+ "# Deploy with docker on Linux:",
172
+ `docker run --runtime nvidia --gpus all \\`,
173
+ ` --name my_vllm_container \\`,
174
+ ` -v ~/.cache/huggingface:/root/.cache/huggingface \\`,
175
+ ` --env "HUGGING_FACE_HUB_TOKEN=<secret>" \\`,
176
+ ` -p 8000:8000 \\`,
177
+ ` --ipc=host \\`,
178
+ ` vllm/vllm-openai:latest \\`,
179
+ ` --model ${model.id}`,
180
+ ].join("\n"),
181
+ content: [
182
+ "# Load and run the model:",
183
+ `docker exec -it my_vllm_container bash -c "vllm serve ${model.id}"`,
184
+ ...runCommand,
185
+ ].join("\n"),
186
+ },
187
+ ];
188
+ };
189
+
130
190
  /**
131
191
  * Add your new local app here.
132
192
  *
@@ -146,6 +206,19 @@ export const LOCAL_APPS = {
146
206
  displayOnModelPage: isLlamaCppGgufModel,
147
207
  snippet: snippetLlamacpp,
148
208
  },
209
+ vllm: {
210
+ prettyLabel: "vLLM",
211
+ docsUrl: "https://docs.vllm.ai",
212
+ mainTask: "text-generation",
213
+ displayOnModelPage: (model: ModelData) =>
214
+ isAwqModel(model) ||
215
+ isGptqModel(model) ||
216
+ isAqlmModel(model) ||
217
+ isMarlinModel(model) ||
218
+ isGgufModel(model) ||
219
+ isTransformersModel(model),
220
+ snippet: snippetVllm,
221
+ },
149
222
  lmstudio: {
150
223
  prettyLabel: "LM Studio",
151
224
  docsUrl: "https://lmstudio.ai",
package/src/model-data.ts CHANGED
@@ -38,6 +38,10 @@ export interface ModelData {
38
38
  bits?: number;
39
39
  load_in_4bit?: boolean;
40
40
  load_in_8bit?: boolean;
41
+ /**
42
+ * awq, gptq, aqlm, marlin, … Used by vLLM
43
+ */
44
+ quant_method?: string;
41
45
  };
42
46
  tokenizer_config?: TokenizerConfig;
43
47
  adapter_transformers?: {
package/src/pipelines.ts CHANGED
@@ -670,6 +670,12 @@ export const PIPELINE_DATA = {
670
670
  color: "red",
671
671
  hideInDatasets: true,
672
672
  },
673
+ "any-to-any": {
674
+ name: "Any-to-Any",
675
+ modality: "multimodal",
676
+ color: "yellow",
677
+ hideInDatasets: true,
678
+ },
673
679
  other: {
674
680
  name: "Other",
675
681
  modality: "other",
@@ -1,15 +1,10 @@
1
- ## Use Cases
2
-
3
- ### Style transfer
1
+ Image-to-image pipelines can also be used in text-to-image tasks, to provide visual guidance to the text-guided generation process.
4
2
 
5
- One of the most popular use cases of image-to-image is style transfer. Style transfer models can convert a normal photography into a painting in the style of a famous painter.
6
-
7
- ## Task Variants
3
+ ## Use Cases
8
4
 
9
5
  ### Image inpainting
10
6
 
11
- Image inpainting is widely used during photography editing to remove unwanted objects, such as poles, wires, or sensor
12
- dust.
7
+ Image inpainting is widely used during photography editing to remove unwanted objects, such as poles, wires, or sensor dust.
13
8
 
14
9
  ### Image colorization
15
10
 
@@ -24,18 +19,27 @@ Super-resolution models increase the resolution of an image, allowing for higher
24
19
  You can use pipelines for image-to-image in 🧨diffusers library to easily use image-to-image models. See an example for `StableDiffusionImg2ImgPipeline` below.
25
20
 
26
21
  ```python
27
- from PIL import Image
28
- from diffusers import StableDiffusionImg2ImgPipeline
22
+ import torch
23
+ from diffusers import AutoPipelineForImage2Image
24
+ from diffusers.utils import make_image_grid, load_image
29
25
 
30
- model_id_or_path = "runwayml/stable-diffusion-v1-5"
31
- pipe = StableDiffusionImg2ImgPipeline.from_pretrained(model_id_or_path, torch_dtype=torch.float16)
32
- pipe = pipe.to(cuda)
26
+ pipeline = AutoPipelineForImage2Image.from_pretrained(
27
+ "stabilityai/stable-diffusion-xl-refiner-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True
28
+ )
33
29
 
34
- init_image = Image.open("mountains_image.jpeg").convert("RGB").resize((768, 512))
35
- prompt = "A fantasy landscape, trending on artstation"
30
+ # this helps us to reduce memory usage- since SDXL is a bit heavy, this could help by
31
+ # offloading the model to CPU w/o hurting performance.
32
+ pipeline.enable_model_cpu_offload()
36
33
 
37
- images = pipe(prompt=prompt, image=init_image, strength=0.75, guidance_scale=7.5).images
38
- images[0].save("fantasy_landscape.png")
34
+ # prepare image
35
+ url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/img2img-sdxl-init.png"
36
+ init_image = load_image(url)
37
+
38
+ prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
39
+
40
+ # pass prompt and image to pipeline
41
+ image = pipeline(prompt, image=init_image, strength=0.5).images[0]
42
+ make_image_grid([init_image, image], rows=1, cols=2)
39
43
  ```
40
44
 
41
45
  You can use [huggingface.js](https://github.com/huggingface/huggingface.js) to infer image-to-image models on Hugging Face Hub.
@@ -53,13 +57,53 @@ await inference.imageToImage({
53
57
  });
54
58
  ```
55
59
 
56
- ## ControlNet
60
+ ## Uses Cases for Text Guided Image Generation
57
61
 
58
- Controlling the outputs of diffusion models only with a text prompt is a challenging problem. ControlNet is a neural network model that provides image-based control to diffusion models. Control images can be edges or other landmarks extracted from a source image.
62
+ ### Style Transfer
63
+
64
+ One of the most popular use cases of image-to-image is style transfer. With style transfer models:
59
65
 
60
- Many ControlNet models were trained in our community event, JAX Diffusers sprint. You can see the full list of the ControlNet models available [here](https://huggingface.co/spaces/jax-diffusers-event/leaderboard).
66
+ - a regular photo can be transformed into a variety of artistic styles or genres, such as a watercolor painting, a comic book illustration and more.
67
+ - new images can be generated using a text prompt, in the style of a reference input image.
68
+
69
+ See 🧨diffusers example for style transfer with `AutoPipelineForText2Image` below.
70
+
71
+ ```python
72
+ from diffusers import AutoPipelineForText2Image
73
+ from diffusers.utils import load_image
74
+ import torch
75
+
76
+ # load pipeline
77
+ pipeline = AutoPipelineForText2Image.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16).to("cuda")
78
+ pipeline.load_ip_adapter("h94/IP-Adapter", subfolder="sdxl_models", weight_name="ip-adapter_sdxl.bin")
79
+
80
+ # set the adapter and scales - this is a component that lets us add the style control from an image to the text-to-image model
81
+ scale = {
82
+ "down": {"block_2": [0.0, 1.0]},
83
+ "up": {"block_0": [0.0, 1.0, 0.0]},
84
+ }
85
+ pipeline.set_ip_adapter_scale(scale)
86
+
87
+ style_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/0052a70beed5bf71b92610a43a52df6d286cd5f3/diffusers/rabbit.jpg")
88
+
89
+ generator = torch.Generator(device="cpu").manual_seed(26)
90
+ image = pipeline(
91
+ prompt="a cat, masterpiece, best quality, high quality",
92
+ ip_adapter_image=style_image,
93
+ negative_prompt="text, watermark, lowres, low quality, worst quality, deformed, glitch, low contrast, noisy, saturation, blurry",
94
+ guidance_scale=5,
95
+ num_inference_steps=30,
96
+ generator=generator,
97
+ ).images[0]
98
+ image
99
+ ```
100
+
101
+ ### ControlNet
102
+
103
+ Controlling the outputs of diffusion models only with a text prompt is a challenging problem. ControlNet is a neural network model that provides image-based control to diffusion models. Control images can be edges or other landmarks extracted from a source image.
104
+ ![Examples](https://huggingface.co/datasets/optimum/documentation-images/resolve/main/neuron/models/12-sdxl-text2img-controlnet.png)
61
105
 
62
- ## Most Used Model for the Task
106
+ ## Pix2Pix
63
107
 
64
108
  Pix2Pix is a popular model used for image-to-image translation tasks. It is based on a conditional-GAN (generative adversarial network) where instead of a noise vector a 2D image is given as input. More information about Pix2Pix can be retrieved from this [link](https://phillipi.github.io/pix2pix/) where the associated paper and the GitHub repository can be found.
65
109
 
@@ -70,8 +114,13 @@ The images below show some examples extracted from the Pix2Pix paper. This model
70
114
  ## Useful Resources
71
115
 
72
116
  - [Image-to-image guide with diffusers](https://huggingface.co/docs/diffusers/using-diffusers/img2img)
117
+ - Image inpainting: [inpainting with 🧨diffusers](https://huggingface.co/docs/diffusers/main/en/api/pipelines/stable_diffusion/inpaint), [demo](https://huggingface.co/spaces/diffusers/stable-diffusion-xl-inpainting)
118
+ - Colorization: [demo](https://huggingface.co/spaces/modelscope/old_photo_restoration)
119
+ - Super resolution: [image upscaling with 🧨diffusers](https://huggingface.co/docs/diffusers/main/en/api/pipelines/stable_diffusion/upscale#super-resolution), [demo](https://huggingface.co/spaces/radames/Enhance-This-HiDiffusion-SDXL)
120
+ - [Style transfer and layout control with diffusers 🧨](https://huggingface.co/docs/diffusers/main/en/using-diffusers/ip_adapter#style--layout-control)
73
121
  - [Train your ControlNet with diffusers 🧨](https://huggingface.co/blog/train-your-controlnet)
74
122
  - [Ultra fast ControlNet with 🧨 Diffusers](https://huggingface.co/blog/controlnet)
123
+ - [List of ControlNets trained in the community JAX Diffusers sprint](https://huggingface.co/spaces/jax-diffusers-event/leaderboard)
75
124
 
76
125
  ## References
77
126
 
@@ -93,7 +93,7 @@ const taskData: TaskDataCustom = {
93
93
  },
94
94
  ],
95
95
  summary:
96
- "Image-to-image is the task of transforming a source image to match the characteristics of a target image or a target image domain. Any image manipulation and enhancement is possible with image to image models.",
96
+ "Image-to-image is the task of transforming an input image through a variety of possible manipulations and enhancements, such as super-resolution, image inpainting, colorization, and more.",
97
97
  widgetModels: ["lllyasviel/sd-controlnet-canny"],
98
98
  youtubeId: "",
99
99
  };
@@ -170,6 +170,7 @@ export const TASKS_MODEL_LIBRARIES: Record<PipelineType, ModelLibraryKey[]> = {
170
170
  "zero-shot-object-detection": ["transformers", "transformers.js"],
171
171
  "text-to-3d": ["diffusers"],
172
172
  "image-to-3d": ["diffusers"],
173
+ "any-to-any": ["transformers"],
173
174
  };
174
175
 
175
176
  /**
@@ -191,6 +192,7 @@ function getData(type: PipelineType, partialTaskData: TaskDataCustom = placehold
191
192
  // Tasks that call getData() without the second argument will
192
193
  // have a "placeholder" page.
193
194
  export const TASKS_DATA: Record<PipelineType, TaskData | undefined> = {
195
+ "any-to-any": getData("any-to-any", placeholder),
194
196
  "audio-classification": getData("audio-classification", audioClassification),
195
197
  "audio-to-audio": getData("audio-to-audio", audioToAudio),
196
198
  "automatic-speech-recognition": getData("automatic-speech-recognition", automaticSpeechRecognition),
@@ -26,8 +26,8 @@ export interface TextToImageInput {
26
26
  */
27
27
  export interface TextToImageParameters {
28
28
  /**
29
- * For diffusion models. A higher guidance scale value encourages the model to generate
30
- * images closely linked to the text prompt at the expense of lower image quality.
29
+ * A higher guidance scale value encourages the model to generate images closely linked to
30
+ * the text prompt, but values too high may cause saturation and other artifacts.
31
31
  */
32
32
  guidance_scale?: number;
33
33
  /**
@@ -35,14 +35,18 @@ export interface TextToImageParameters {
35
35
  */
36
36
  negative_prompt?: string[];
37
37
  /**
38
- * For diffusion models. The number of denoising steps. More denoising steps usually lead to
39
- * a higher quality image at the expense of slower inference.
38
+ * The number of denoising steps. More denoising steps usually lead to a higher quality
39
+ * image at the expense of slower inference.
40
40
  */
41
41
  num_inference_steps?: number;
42
42
  /**
43
- * For diffusion models. Override the scheduler with a compatible one
43
+ * Override the scheduler with a compatible one.
44
44
  */
45
45
  scheduler?: string;
46
+ /**
47
+ * Seed for the random number generator.
48
+ */
49
+ seed?: number;
46
50
  /**
47
51
  * The size in pixel of the output image
48
52
  */
@@ -22,7 +22,7 @@
22
22
  "properties": {
23
23
  "guidance_scale": {
24
24
  "type": "number",
25
- "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."
25
+ "description": "A higher guidance scale value encourages the model to generate images closely linked to the text prompt, but values too high may cause saturation and other artifacts."
26
26
  },
27
27
  "negative_prompt": {
28
28
  "type": "array",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "num_inference_steps": {
35
35
  "type": "integer",
36
- "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."
36
+ "description": "The number of denoising steps. More denoising steps usually lead to a higher quality image at the expense of slower inference."
37
37
  },
38
38
  "target_size": {
39
39
  "type": "object",
@@ -50,7 +50,11 @@
50
50
  },
51
51
  "scheduler": {
52
52
  "type": "string",
53
- "description": "For diffusion models. Override the scheduler with a compatible one"
53
+ "description": "Override the scheduler with a compatible one."
54
+ },
55
+ "seed": {
56
+ "type": "integer",
57
+ "description": "Seed for the random number generator."
54
58
  }
55
59
  }
56
60
  }