mrhan1993 / Fooocus-API

FastAPI powered API for Fooocus
GNU General Public License v3.0
567 stars 152 forks source link

Advanced parameters don't get passed #177

Closed merijnvanes closed 7 months ago

merijnvanes commented 8 months ago

Hi, your work is much appreciated!

If I run the following code with the advanced_params commented out. I get exactly the same image as when I pass it with the advanced_params included, where all settings are default except the overwrite_step = 1 instead of -1. This should give a different image, but it doesn't. If I am passing the advanced parameters incorrectly let me know, otherwise I think this doesn't function properly.

import replicate

API = replicate.Client(api_token="REPLICATE_API_TOKEN")

output = API.run(
    "konieshadow/fooocus-api:a7e8fa2f96b01d02584de2b3029a8452b9bf0c8fa4127a6d1cfd406edfad54fb",
    input={
        "prompt": "cow",
        "image_seed": 6091967260935476000,
        "image_number": 1,
        "style_selections": "Fooocus V2,Fooocus Photograph,Fooocus Negative",
        "advanced_params": [
            False, 1.5, 0.8, 0.3, 7.0, 'dpmpp_2m_sde_gpu', 'karras', False, 1, # <---- This last "1" should be the overwrite_step
            -1, -1, -1, -1, -1, False, False, False, False, 0.25, 64, 128,
            'joint', False, None, None, None, None, False, False, 'v2.6', 1.0,
            0.618
        ]
    }
)
print(output)

cf14b631-2756-4bb6-8643-9cf56d9d1e6a

konieshadow commented 8 months ago

@merijnvanes The replicate model doesn't support advanced params now.