You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update Release compatible with Fooocus-API v0.4.0.6
Changelog:
- Fixed preview_stream and inpaint_preset for V1 endpoints
- Updated and refractored code
- Updated docs and added license
See also [Fooocus-API changelog](https://github.com/mrhan1993/Fooocus-API/releases) to find out what's new in the API code and [Fooocus changelog](https://github.com/lllyasviel/Fooocus/releases) to see what's new in the included Fooocus version.
This release is breaking some speed records on both cached and non-cached runs, surely give it it a try!
[NetworkVolume](https://github.com/davefojtik/RunPod-Fooocus-API/tree/NetworkVolume) and [Standalone](https://github.com/davefojtik/RunPod-Fooocus-API/tree/Standalone)
4
8
5
-
This repository consists of two branches:
6
-
[NetworkVolume](https://github.com/davefojtik/RunPod-Fooocus-API/tree/NetworkVolume) and [Standalone](https://github.com/davefojtik/RunPod-Fooocus-API/tree/Standalone)
The **NetworkVolume** expects you to install and prepare your own instance on the RunPod network volume, or to use our `3wad/runpod-fooocus-api:0.4.0.6-networksetup` image for it. This is ideal if you want to change models, loras or other contents on the fly, let your users upload them, or persist generated image files. The downside of this solution is slower starts because everything has to be loaded over the datacenter's network. See [network-guide](https://github.com/davefojtik/RunPod-Fooocus-API/blob/NetworkVolume/docs/network-guide.md) for step-by-step instructions.
9
10
10
-
11
-
The **NetworkVolume** expects you to install and prepare your own `Fooocus-API v0.3.33` instance on the RunPod network volume, or to use our `3wad/runpod-fooocus-api:0.3.33-networksetup` image. This is ideal if you want to change models, loras or other contents on the fly. The downside of this solution is slower starts, especially when the endpoint is not used frequently. See [network-guide](https://github.com/davefojtik/RunPod-Fooocus-API/blob/NetworkVolume/docs/network-guide.md) for step-by-step instructions.
12
-
13
-
The **Standalone** branch is a ready-to-use docker image with all the files and models already baked and installed into it. You can still customize it to use your own content, but it can't be changed without rebuilding and redeploying the image. This is ideal if you want the fastest, cheapest possible endpoint for long-term usage without the need for frequent changes of models or loras. See [standalone-guide](https://github.com/davefojtik/RunPod-Fooocus-API/blob/Standalone/docs/standalone-guide.md) or simply use `3WaD/RunPod-Fooocus-API:v0.3.33-standalone` as the image for a quick deploy with the default Juggernaut V8 on your RunPod serverless endpoint.
11
+
The **Standalone** branch is a ready-to-use docker image with all the files and models already baked and installed into it. You can still customize it to use your own content, but it can't be changed without rebuilding and redeploying the image. This is ideal if you want the fastest, cheapest possible endpoint for long-term usage without the need for frequent changes of its contents. See [standalone-guide](https://github.com/davefojtik/RunPod-Fooocus-API/blob/Standalone/docs/standalone-guide.md) or simply use `3WaD/runpod-fooocus-api:0.4.0.6-standalone` as the image for a quick deploy with the default Juggernaut V8 on your RunPod serverless endpoint.
14
12
15
13
## How to send requests
16
14
[request_examples.js](https://github.com/davefojtik/RunPod-Fooocus-API/blob/NetworkVolume/docs/request_examples.js) contain example payloads for all endpoints on your serverless worker, regardless of the branch. But don't hesitate to ask if you need more help.
17
15
18
16
## Contributors Welcomed
19
-
Feel free to make pull requests, fixes, improvements and suggestions to the code. I can spend only limited time on this as it's only a side tool project for an AI Agent. So any cooperation will help manage this repo better.
17
+
Feel free to make pull requests, fixes, improvements and suggestions to the code. Any cooperation on keeping this repo up-to-date and free of bugs is highly welcomed.
20
18
21
19
## Updates
22
-
The version of compatible Fooocus-API is always stated at the top of this readme. We're not always on the latest version automatically, as there can be breaking changes. The updates are being made only after thorough tests on our community discord bot, and only if we see that the new version performs better or solves some problems.
20
+
We're not always on the latest version automatically, as there can be breaking changes or major bugs. The updates are being made only after thorough tests by our community of Discord users generating images with the AI agent using this repo as it's tool. And only if we see that the new version performs better and stable.
21
+
___
22
+
> *Disclaimer: This repo is in no way affiliated with RunPod Inc. All logos and names are owned by the authors. This is an unofficial community implementation*
20GB is just enough for the generic Foocus with Juggernaut and **all** controlnet models (you can save some space by not downloading those you don't plan to use - by modifying the [script](https://github.com/davefojtik/RunPod-Fooocus-API/blob/NetworkVolume/src/networksetup.sh) and making your own setup image). You can increase its size any time if you need additional models, loras etc. But unfortunately, it cannot be reduced back without creating a new one.
4
-
-[**Create a custom CPU Pod Template:**](https://www.runpod.io/console/user/templates) use the `3wad/runpod-fooocus-api:v0.3.33-networksetup` image, 20GB disk size and mount path `/workspace`. *Note: 20GB is max for CPU pods, if you need more space, you'll have to use GPU pod even for the installation*
5
-
-[**Run a CPU pod:**](https://www.runpod.io/console/pods) with **network volume** and runpod-fooocus-api template you've just created. Any CPU pod will do, the installation is just download-intensive. After a while, you should see a "Setup complete!" message in Pod logs. After that, you can move to the serverless setup steps.
4
+
-[**Create a custom CPU Pod Template:**](https://www.runpod.io/console/user/templates) use the `3wad/runpod-fooocus-api:0.4.0.6-networksetup` image, 20GB disk size and mount path `/workspace`. *Note: 20GB is max for CPU pods, if you need more space, you'll have to use GPU pod even for the installation*
5
+
-[**Run a CPU pod:**](https://www.runpod.io/console/pods) with **network volume** and runpod-fooocus-api template you've just created. Any CPU pod will do, the installation is just download-intensive. After a while, you should see a "Setup complete!" message in Pod logs. After that, you can terminate the pod and move to the serverless setup steps.
6
6
---
7
-
- Now you can use our premade image: `3wad/runpod-fooocus-api:0.3.33-networkendpoint` and skip the next step OR create your custom docker image from this repo that will run on the actual serverless API. Feel free to adjust the code to your needs.
7
+
- Now you can use our premade image: `3wad/runpod-fooocus-api:0.4.0.6-networkendpoint` and skip the next step OR create your custom docker image from this repo that will run on the actual serverless API. Feel free to adjust the code to your needs.
8
8
-*If you built your own image, upload it to the Docker Hub.*
9
9
-[**Create a custom Serverless Pod Template:**](https://www.runpod.io/console/user/templates) using the Docker Hub image you've just uploaded (or our premade one).
10
-
-[**Create a new Serverless API Endpoint:**](https://www.runpod.io/console/serverless) Make sure to choose your (or our) Docker Hub image and not the `3wad/runpod-fooocus-api:v0.3.33-networksetup` from the step 2. In Advanced settings choose your created network volume.
10
+
-[**Create a new Serverless API Endpoint:**](https://www.runpod.io/console/serverless) Make sure to choose your (or our) Docker Hub image and not the `3wad/runpod-fooocus-api:0.4.0.6-networksetup` from the step 2. In Advanced settings choose your created network volume.
11
11
- Other settings are your choice, but I personally found that using 4090/L4 GPUs + Flashboot is the most cost-effective one.
12
-
- That's it! See the [request_examples]() for how to make requests to this endpoint from your app.
12
+
- That's it! See the [request_examples](https://github.com/davefojtik/RunPod-Fooocus-API/blob/NetworkVolume/docs/request_examples.js) for how to make requests to this endpoint from your app.
"outpaint_selections":"Top,Bottom,Left,Right",// This param is special. It's expecting "Python Literals seperated by commas". That's why it's not a stringified array in this case.
// To overcome some differences which arise from running Fooocus on RunPod serverless
360
+
// To overcome some differences which arise from running this on RunPod serverless
362
361
// we have to add several custom parameters to our payloads that are not part of the original Fooocus-API
363
362
364
363
"api_name"// "string" - Chooses what Fooocus-API endpoint we're actually calling
365
364
"preview_url"// "string" - If you use Fooocus-API "async_process:true" and want to get a stream of preview images, you should add your app's url endpoint where POST requests with previews will arrive
366
365
"preview_interval"// "number" - Optional param when using preview_url, sets how often in seconds the preview is checked and sent to your app. If not set defaults to 1
367
366
"preview_headers"// "object" - Optional param when using preview_url, sets custom headers to send with the preview request (for tokens, auth etc.)
367
+
// preview_headers should be json containing header and it's value, in V1 endpoints format them like this: "{\"Cookie\":\"foo=bar\"}"
368
368
"inpaint_preset"// "string" - Custom fix for missing "Inpaint Method" selection in Fooocus-API. Can be one of: 'Improve Detail', 'Modify Content' or 'Inpaint or Outpaint'
369
369
"clear_output"// "boolean" - Chooses if you want to keep the image files on network volume/worker local storage or not. Can be true or false. Default is true (not saving image files)
0 commit comments