Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Running API through gradio not yielding results / more documentation #2972

Closed
4 of 5 tasks
alexatnv opened this issue May 21, 2024 · 3 comments
Closed
4 of 5 tasks
Labels
feedback pending Waiting for further information question Further information is requested

Comments

@alexatnv
Copy link

Checklist

  • The issue has not been resolved by following the troubleshooting guide
  • The issue exists on a clean installation of Fooocus
  • The issue exists in the current version of Fooocus
  • The issue has not been reported before recently
  • 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)
()

@alexatnv alexatnv added bug Something isn't working triage This needs an (initial) review labels May 21, 2024
@mashb1t
Copy link
Collaborator

mashb1t commented May 21, 2024

Please check out #2950 (reply in thread)

@mashb1t mashb1t added question Further information is requested feedback pending Waiting for further information and removed bug Something isn't working triage This needs an (initial) review labels May 21, 2024
@alexatnv
Copy link
Author

Thanks - Fooocus-API resolved all issues

@mashb1t
Copy link
Collaborator

mashb1t commented May 23, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback pending Waiting for further information question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants