Closed branaway closed 3 months ago
By the look of the http sniffing captures, the images were never picked up by the client and uploaded. Null paths were sent in place the blob.
cc @hannahblair as I believe you are currently looking into the file handling related issues for the js client
I was able to work around the initial hurdle by directly reference a already uploaded image using {path: '/tmp/gradio/.../image.png'} as the image input parameter and the interference was able to progress to the finish and returned me a path of the supposedly result image. However, a 404 raised when I tried to access it. Again the Python client worked fine.
The http sniffer showed that there are lots of heartbeats packs been sent to the server for the Python client, while there was none in case of the JavaScript client.
Update: That was until I upgraded the client to 0.20 from 0.19.4. The latest client refused to run with:
error; Error: There is no endpoint matching that name of fn_index matching that number. at get_endpoint_info (file:///Users/bran/localProjects/hf-instantID/node_modules/@gradio/client/dist/index.js:1798:11) at Client.submit (file:///Users/bran/localProjects/hf-instantID/node_modules/@gradio/client/dist/index.js:1233:51) at file:///Users/bran/localProjects/hf-instantID/gen.js:79:18
I like the event model the js client offers process updating after invoking the submit
method on the client, better then the Python model in which case I need to keep polling to find out the progress ( or is it?)
Same issue. When I read get_endpoint_info, I found that fn_index was undefined. This was because api_map was set to { predict: undefined, js_fn: undefined, js_fn_1: undefined }
. When I looked into where api_map was being created, I saw the following code in map_names_to_ids:
fns.forEach(({ api_name, id }) => {
if (api_name)
apis[api_name] = id;
});
At this point, the content of fns (from config.dependencies) was as follows, indicating there was no id:
"dependencies": [
{
"targets": [
[
10,
"click"
],
[
0,
"submit"
],
[
1,
"submit"
]
],
"inputs": [
0,
1
],
"outputs": [
2
],
"backend_fn": true,
"js": null,
"queue": null,
"api_name": "predict",
"scroll_to_output": false,
"show_progress": "full",
"every": null,
"batch": false,
"max_batch_size": 4,
"cancels": [],
"types": {
"continuous": false,
"generator": false
},
"collects_event_data": false,
"trigger_after": null,
"trigger_only_on_success": false,
"trigger_mode": "once",
"show_api": true,
"zerogpu": true
},
...
]
I am having same issue when trying to uload an image in node enviourment so later i can connect my node env to react native
Describe the bug
https://huggingface.co/spaces/InstantX/InstantID
I was trying to invoke this endpoint with both the Python client and the JavaScript client. The Python client works fine and the JS client doesn't work. I received an error message without much detail:
{ type: 'status', endpoint: '/generate_image', fn_index: 2, time: 2024-05-28T17:59:56.842Z, queue: true, message: null, stage: 'error', code: undefined, success: false }
Have you searched existing issues? š
Reproduction
Screenshot
No response
Logs
No response
System Info
Severity
Blocking usage of gradio