Skip to content

Commit 3e32bc4

Browse files
committed
update the tapes.ts, update textToImage.ts nscale response format
1 parent 490d231 commit 3e32bc4

File tree

4 files changed

+7533
-7681
lines changed

4 files changed

+7533
-7681
lines changed

packages/inference/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
"prepublishOnly": "pnpm run build",
5050
"test": "vitest run --config vitest.config.mts",
5151
"test:browser": "vitest run --browser.name=chrome --browser.headless --config vitest.config.mts",
52-
"check": "tsc"
52+
"check": "tsc",
53+
"test-nscale-output-types": "tsx src/test-nscale-output-types.ts"
5354
},
5455
"dependencies": {
5556
"@huggingface/tasks": "workspace:^"

packages/inference/src/providers/nscale.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/**
2+
* See the registered mapping of HF model ID => Nscale model ID here:
3+
*
4+
* https://huggingface.co/api/partners/nscale/models
5+
*
6+
* This is a publicly available mapping.
7+
*
8+
* If you want to try to run inference for a new model locally before it's registered on huggingface.co,
9+
* you can add it to the dictionary "HARDCODED_MODEL_ID_MAPPING" in consts.ts, for dev purposes.
10+
*
11+
* - If you work at Nscale and want to update this mapping, please use the model mapping API we provide on huggingface.co
12+
* - If you're a community member and want to add a new supported HF model to Nscale, please open an issue on the present repo
13+
* and we will tag Nscale team members.
14+
*
15+
* Thanks!
16+
*/
117
import type { ProviderConfig, UrlParams, HeaderParams, BodyParams } from "../types";
218

319
const NSCALE_API_BASE_URL = "https://inference.api.nscale.com";

packages/inference/test/HfInference.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1506,7 +1506,6 @@ describe.concurrent("HfInference", () => {
15061506
width: 512,
15071507
num_inference_steps: 20,
15081508
seed: 42,
1509-
response_format: "url",
15101509
},
15111510
});
15121511
expect(res).toBeInstanceOf(Blob);

packages/inference/test/tapes.json

Lines changed: 7515 additions & 7679 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)