mrhan1993 / Fooocus-API

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

It seems that it does not support version 2.3.0 of Lightning #258

Closed DraGonPlan closed 5 months ago

DraGonPlan commented 6 months ago

When I set performance_selection to Lightning, I receive an error message: 422 Unprocessable Entity Is this a bug? Or is it true that the current version does not support Lightning for foocus2.3.0

piyushgit011 commented 6 months ago

257 hey @DraGonPlan ,

can you help me with this , i am having trouble while setting it up

mrhan1993 commented 6 months ago

i noticed this function, but not support yet.My family has had some accidents, it may take half a month to complete the next update

miraculix95 commented 6 months ago

all the best to your family

evanchan1989 commented 6 months ago

all the best to your family

mrhan1993 commented 6 months ago

269 have a try

chenav commented 6 months ago

Hello,

It does not work, cause when you POST a JSON asking for Lightning perf, the API answers:

{
    "detail": [
        {
            "type": "enum",
            "loc": [
                "body",
                "performance_selection"
            ],
            "msg": "Input should be 'Speed', 'Quality' or 'Extreme Speed'",
            "input": "Lightning",
            "ctx": {
                "expected": "'Speed', 'Quality' or 'Extreme Speed'"
            }
        }
    ]
}

Seems to be managed by predict.py

You can fix it by changing lines 32-33 of predict.py


   performance_selection: str = Input( default='Lightning', 
                                          description="Performance selection", choices=['Speed', 'Quality', 'Extreme Speed', 'Lightning']),

Forked it, built it, deployed it: it works ;)

C.

mrhan1993 commented 5 months ago

Hello,

It does not work, cause when you POST a JSON asking for Lightning perf, the API answers:

{
    "detail": [
        {
            "type": "enum",
            "loc": [
                "body",
                "performance_selection"
            ],
            "msg": "Input should be 'Speed', 'Quality' or 'Extreme Speed'",
            "input": "Lightning",
            "ctx": {
                "expected": "'Speed', 'Quality' or 'Extreme Speed'"
            }
        }
    ]
}

Seems to be managed by predict.py

You can fix it by changing lines 32-33 of predict.py


   performance_selection: str = Input( default='Lightning', 
                                          description="Performance selection", choices=['Speed', 'Quality', 'Extreme Speed', 'Lightning']),

Forked it, built it, deployed it: it works ;)

C.

This file is used for replicate, I will update it later