Do you notice anything wrong ? Because now , when I try to upload my adapter_model.safetensorsadapter_model.safetensors I recevie a new error from the wrangler ✘ [ERROR] 🚨 Couldn't upload file: A request to the Cloudflare API (/accounts/1111122223334444/ai/finetunes/6a4a4a4a4a4a4a4a4-a5aa5a5a-aaaaaa/finetune-assets) failed. FILE_PARSE_ERROR: 'file' should be of valid safetensors type [code: 1000], quiting...✘ [ERROR] 🚨 Couldn't upload file: A request to the Cloudflare API (/accounts/1111122223334444/ai/finetunes/6a4a4a4a4a4a4a4a4-a5aa5a5a-aaaaaa/finetune-assets) failed. FILE_PARSE_ERROR: 'file' should be of valid safetensors type [code: 1000], quiting...
So to recap my tests:
The adapter previously trained using mlx_lm (https://github.com/ml-explore/mlx-examples, https://huggingface.co/docs/hub/en/mlx) is accepted during the fine-tune upload/creation process , but it generates the error InferenceUpstreamError: ERROR 3028: Unknown internal errorInferenceUpstreamError: ERROR 3028: Unknown internal error when I try to run an inference.
The adapter trained using autotrain from huggingface is not accepted during the fine-tune upload/creation process , giving me the error described above.
Is there any other required parameter like (rank r <=8 or quantization = Nonerank r <=8 or quantization = None) that has not been specified into the documentation ? Thanks again for the support
I would also like to know if there is any REST API Endpoint (or via wrangler command ) to DELETE a prev created finetune , as after all my (unsuccessful) tests I have a big list of not-working finetune. From the Documentation I see there are methods to list or create only. Thanks
Hi, is it possible to give width/height to text-to-image? I see for stability ai SDXL e.g supports 1216x832. Basically I need to generate portrait and landscapes.
Ah gotcha! Should have checked there. Thanks for the prompt response. I noticed the broken one wasn't' showing in the Active ModelsActive Models filter
Should workers be compatible with transformers.js yet? I've tried setting it up, hoping to cache everything in KV after the first request! But I can't seem to pull the wasm files. Docs say you should be able to load from the jsdelivr cdn instead of trying to pull from /public, which I thought would work for Workers but I'm getting Error: no available backend found. ERR: [wasm] RuntimeError: Aborted(both async and sync fetching of the wasm failed)Error: no available backend found. ERR: [wasm] RuntimeError: Aborted(both async and sync fetching of the wasm failed). But the other files (config, onnx) are loading up fine. @Xenova I hope it's still okay to tag you! I'm so excited to get your library up and running!
hey guys... iam loving the CF hosted Workers AI inference and all the models! I have a few questions: 1/ what is the pricing for beta mode models? 2/ what does it mean by it is in "beta"? CF wont pull the plug on the model I assume? 3/ are beta models suitable for staging type situations? ie not exactly prod, but close
Hi. When I'll end my limit from Workers Free will cloudflare start the paid pricing automatically or do I need to enable it myself? If it starts automatically can I turn it off somehow?
It's quite disappointing to see the AI team's approach to backwards compatibility thus far, going against all of the great paradigms the Workers runtime has enforced for years.
it took me quite some time to argue the point about this being a breaking change, despite pushback from multiple team members and saying the risk was "non-existent". Turns out, after this was merged, it broke things and had to be partially reverted
The docs seem out of date, there is no "Account details section contains your Account ID" section on workers and pages ->overview https://developers.cloudflare.com/fundamentals/setup/find-account-and-zone-ids/#find-account-id-workers-and-pages And the only way I found to find it is by creating a domain (even though I did not intend to register any w/ CF) but then finally noticed the account_id is after the dash.cloudflare.com/{ACCOUNT_ID}/ on the site This could be much clearer for first-time users.
is this the correct way to send streams from cloudflare worker? getting typescript error,
Argument of type 'IterableReadableStream<{ context: Document<Record<string, any>>[]; answer: string; } & { [key: string]: unknown; }>' is not assignable to parameter of type 'BodyInit | null | undefined'.
Type 'IterableReadableStream<{ context: Document<Record<string, any>>[]; answer: string; } & { [key: string]: unknown; }>' is not assignable to type 'ReadableStream<Uint8Array>'.
The types returned by 'getReader()' are incompatible between these types.
Type 'ReadableStreamDefaultReader<{ context: Document<Record<string, any>>[]; answer: string; } & { [key: string]: unknown; }>' is not assignable to type 'ReadableStreamDefaultReader<Uint8Array>'.
Type '{ context: Document<Record<string, any>>[]; answer: string; } & { [key: string]: unknown; }' is missing the following properties from type 'Uint8Array': BYTES_PER_ELEMENT, buffer, byteLength, byteOffset, and 27 more.ts(2345)
const stream: IterableReadableStream<{
context: Document<Record<string, any>>[];
answer: string;
} & {
[key: string]: unknown;
}>
Argument of type 'IterableReadableStream<{ context: Document<Record<string, any>>[]; answer: string; } & { [key: string]: unknown; }>' is not assignable to parameter of type 'BodyInit | null | undefined'.
Type 'IterableReadableStream<{ context: Document<Record<string, any>>[]; answer: string; } & { [key: string]: unknown; }>' is not assignable to type 'ReadableStream<Uint8Array>'.
The types returned by 'getReader()' are incompatible between these types.
Type 'ReadableStreamDefaultReader<{ context: Document<Record<string, any>>[]; answer: string; } & { [key: string]: unknown; }>' is not assignable to type 'ReadableStreamDefaultReader<Uint8Array>'.
Type '{ context: Document<Record<string, any>>[]; answer: string; } & { [key: string]: unknown; }' is missing the following properties from type 'Uint8Array': BYTES_PER_ELEMENT, buffer, byteLength, byteOffset, and 27 more.ts(2345)
const stream: IterableReadableStream<{
context: Document<Record<string, any>>[];
answer: string;
} & {
[key: string]: unknown;
}>
whister should work with webm format? in the openai docs says it's supported but testing agains the API from cloudflare i see an error, Invalid or incomplete input for the model: model returned: Invalid audio input: F
✘ [ERROR] 🚨 Couldn't upload file: A request to the Cloudflare API (/accounts/1111122223334444/ai/finetunes/6a4a4a4a4a4a4a4a4-a5aa5a5a-aaaaaa/finetune-assets) failed. FILE_PARSE_ERROR: 'file' should be of valid safetensors type [code: 1000], quiting...
✘ [ERROR] 🚨 Couldn't upload file: A request to the Cloudflare API (/accounts/1111122223334444/ai/finetunes/6a4a4a4a4a4a4a4a4-a5aa5a5a-aaaaaa/finetune-assets) failed. FILE_PARSE_ERROR: 'file' should be of valid safetensors type [code: 1000], quiting...
[wrangler:err] InferenceUpstreamError: AiError: undefined: ERROR 3001: Unknown internal error at Ai.run (cloudflare-internal:ai-api:66:23) at async Object.fetch (file:///C:/Users/Fathan/PetProject/cloudflare-demo/src/index.ts:15:21) at async jsonError (file:///C:/Users/Fathan/PetProject/cloudflare-demo/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts:22:10) at async drainBody (file:///C:/Users/Fathan/PetProject/cloudflare-demo/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts:5:10)[wrangler:inf] POST / 500 Internal Server Error (2467ms)
[wrangler:err] InferenceUpstreamError: AiError: undefined: ERROR 3001: Unknown internal error at Ai.run (cloudflare-internal:ai-api:66:23) at async Object.fetch (file:///C:/Users/Fathan/PetProject/cloudflare-demo/src/index.ts:15:21) at async jsonError (file:///C:/Users/Fathan/PetProject/cloudflare-demo/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts:22:10) at async drainBody (file:///C:/Users/Fathan/PetProject/cloudflare-demo/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts:5:10)[wrangler:inf] POST / 500 Internal Server Error (2467ms)
FILE_PARSE_ERROR
FILE_PARSE_ERROR
Error: no available backend found. ERR: [wasm] RuntimeError: Aborted(both async and sync fetching of the wasm failed)
Error: no available backend found. ERR: [wasm] RuntimeError: Aborted(both async and sync fetching of the wasm failed)
const stream = await retrivalChain.stream({input: 'what is hello world',});return new Response(stream, { headers: { 'content-type': 'text/event-stream', 'Access-Control-Allow-Origin': '*', },});
const stream = await retrivalChain.stream({input: 'what is hello world',});return new Response(stream, { headers: { 'content-type': 'text/event-stream', 'Access-Control-Allow-Origin': '*', },});
Argument of type 'IterableReadableStream<{ context: Document<Record<string, any>>[]; answer: string; } & { [key: string]: unknown; }>' is not assignable to parameter of type 'BodyInit | null | undefined'. Type 'IterableReadableStream<{ context: Document<Record<string, any>>[]; answer: string; } & { [key: string]: unknown; }>' is not assignable to type 'ReadableStream<Uint8Array>'. The types returned by 'getReader()' are incompatible between these types. Type 'ReadableStreamDefaultReader<{ context: Document<Record<string, any>>[]; answer: string; } & { [key: string]: unknown; }>' is not assignable to type 'ReadableStreamDefaultReader<Uint8Array>'. Type '{ context: Document<Record<string, any>>[]; answer: string; } & { [key: string]: unknown; }' is missing the following properties from type 'Uint8Array': BYTES_PER_ELEMENT, buffer, byteLength, byteOffset, and 27 more.ts(2345)const stream: IterableReadableStream<{ context: Document<Record<string, any>>[]; answer: string;} & { [key: string]: unknown;}>
Argument of type 'IterableReadableStream<{ context: Document<Record<string, any>>[]; answer: string; } & { [key: string]: unknown; }>' is not assignable to parameter of type 'BodyInit | null | undefined'. Type 'IterableReadableStream<{ context: Document<Record<string, any>>[]; answer: string; } & { [key: string]: unknown; }>' is not assignable to type 'ReadableStream<Uint8Array>'. The types returned by 'getReader()' are incompatible between these types. Type 'ReadableStreamDefaultReader<{ context: Document<Record<string, any>>[]; answer: string; } & { [key: string]: unknown; }>' is not assignable to type 'ReadableStreamDefaultReader<Uint8Array>'. Type '{ context: Document<Record<string, any>>[]; answer: string; } & { [key: string]: unknown; }' is missing the following properties from type 'Uint8Array': BYTES_PER_ELEMENT, buffer, byteLength, byteOffset, and 27 more.ts(2345)const stream: IterableReadableStream<{ context: Document<Record<string, any>>[]; answer: string;} & { [key: string]: unknown;}>