[Bug]: Running API through gradio not yielding results / more documentation
Checklist
- [X] The issue has not been resolved by following the troubleshooting guide
- [X] The issue exists on a clean installation of Fooocus
- [X] The issue exists in the current version of Fooocus
- [ ] The issue has not been reported before recently
- [X] The issue has been reported before but has not been fixed yet
What happened?
I am trying to run Fooocus inpainting (on bottom, left, right) of my source image using the gradio API.
I am open to other non-manual ways of initiating fooocus that isn't necessarily through gradio. Preferably programatically.
Steps to reproduce the problem
I used the latest API information in the gradio client
What should have happened?
Fooocus should pass an image i define, and extend it from bottom, left, and right
What browsers do you use to access Fooocus?
Microsoft Edge
Where are you running Fooocus?
Locally
What operating system are you using?
Windows 11
Console logs
from gradio_client import Client
client = Client("https://myclient.gradio.live/")
# Step 1: Enable outpainting
result1 = client.predict(
"Inpaint or Outpaint (default)",
fn_index=33
)
print(result1)
# Step 2: Use the specific settings for image processing
result2 = client.predict(
True,
"Howdy!",
"Howdy!",
["Fooocus V2"],
"Quality",
"704×1408 <span style='color: grey;'> ∣ 1:2</span>",
1,
"png",
"Howdy!",
True,
0,
1,
"null",
"None",
0.1,
True,
"None",
-2,
True,
"None",
-2,
True,
"None",
-2,
True,
"None",
-2,
True,
"None",
-2,
True,
"Howdy!",
"Disabled",
"https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png",
["Left"],
"https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png",
"Howdy!",
"https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png",
True,
True,
True,
0.1,
0.1,
0,
1,
"euler",
"normal",
-1,
-1,
-1,
-1,
-1,
-1,
True,
True,
True,
True,
1,
1,
"joint",
0,
True,
0,
0,
0,
0,
True,
True,
"None",
0,
0,
True,
True,
-64,
True,
"fooocus",
"https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png",
0,
0,
"ImagePrompt",
"https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png",
0,
0,
"ImagePrompt",
"https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png",
0,
0,
"ImagePrompt",
"https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png",
0,
0,
"ImagePrompt",
fn_index=40
)
print(result2)
Additional information
Log output:
Loaded as API: https://myclient.gradio.live/ ✔ ({'visible': False, 'value': '', 'type': 'update'}, {'visible': True, 'type': 'update'}, False, 'v2.6', 1.0, 0.618) ()
Please check out https://github.com/lllyasviel/Fooocus/discussions/2950#discussioncomment-9499108
Thanks - Fooocus-API resolved all issues
@alexatnv alright, happy to help. If you ever need live updates about the process, you can always fall back to the websocket Gradio API. Keep in mind that Fooo us-API is not in any way associated with Fooocus and receives updates of Fooocus AI features less regularly.