doc
doc
Explore posts from servers
RRunPod
Created by doc on 2/17/2024 in #⚡|serverless
comfyui + runpod serverless
I'm looking to host my comfyui workflow via runpod serverless. I'm curious how does the comfyui startup process work with serverless. For example, in my local setup, everytime I restart my comfyui localhost, it takes awhile to get up and running, let's call this the "comfyui cold start". But once it is setup, it's relatively quick to run many generations one after another. My Question: If I integrate my comfyui setup with runpod serverless, anytime there is an API call, does the call have to go through the "comfyui cold start" everytime? (This is not to be confused with typical serverless cold starts which I assume is what is referred to from the runpod serverless webpage which says "cold start in milliseconds" https://www.runpod.io/serverless-gpu)
11 replies
TtRPC
Created by doc on 7/4/2023 in #❓-help
trpc + fastify POST request not working
I have a trpc mutation like this:
create: publicProcedure
.input(z.object({ title: z.string() }))
.mutation(({ input, ctx }) => {
const id = db.posts.length + 1;
const post = { id, title: input.title };
db.posts.push(post);
return post;
}),
create: publicProcedure
.input(z.object({ title: z.string() }))
.mutation(({ input, ctx }) => {
const id = db.posts.length + 1;
const post = { id, title: input.title };
db.posts.push(post);
return post;
}),
I am trying to call it via HTTP:
curl --request POST \
--url http://localhost:2022/trpc/posts.create \
--header 'Content-Type: application/json' \
--data '{
"title": "hello"
}'
curl --request POST \
--url http://localhost:2022/trpc/posts.create \
--header 'Content-Type: application/json' \
--data '{
"title": "hello"
}'
it errors with:
"code": -32600, "data": { "code": "BAD_REQUEST", "httpStatus": 400, .....}
Not sure whats going on or why is it erroring. Any help is appreciated 🙂
"dependencies": {
"@fastify/websocket": "^7.1.2",
"@trpc/client": "^10.33.0",
"@trpc/server": "^10.33.0",
"fastify": "^4.13.0",
"node-fetch": "^3.3.1",
"superjson": "^1.12.4",
"tslib": "^2.5.0",
"ws": "^8.0.0",
"zod": "^3.0.0"
},
"dependencies": {
"@fastify/websocket": "^7.1.2",
"@trpc/client": "^10.33.0",
"@trpc/server": "^10.33.0",
"fastify": "^4.13.0",
"node-fetch": "^3.3.1",
"superjson": "^1.12.4",
"tslib": "^2.5.0",
"ws": "^8.0.0",
"zod": "^3.0.0"
},
3 replies
TtRPC
Created by doc on 1/27/2023 in #❓-help
TRPCClientError: Unexpected end of JSON input
Hey I am running into this issue when calling a mutateAsync in production in Vercel (the error does not appear in localhost dev mode).
TRPCClientError: Unexpected end of JSON input
My code base is so large that I am not sure where do I start to debug. Are there any best practices that I should follow to avoid this error? It is similar to this issue: https://github.com/trpc/trpc/discussions/1847#discussioncomment-4244990
19 replies