mrhan1993 / Fooocus-API

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

Worker error: module 'modules.path' has no attribute 'default_refiner_switch' #46

Closed thiner closed 10 months ago

thiner commented 10 months ago

Just upgraded to latest version, call text-to-image failed with below error:

Worker error: module 'modules.path' has no attribute 'default_refiner_switch'
curl -X 'POST' \
  'http://localhost/v1/generation/text-to-image?accept=image%2Fpng' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "prompt": "a handsome Chinese young man, standing at the front of a typical Chinese landscape, holding a Lab Series product",
  "negative_prompt": "",
  "style_selections": [
    "Fooocus V2",
    "Fooocus Enhance",
    "Fooocus Sharp"
  ],
  "performance_selection": "Speed",
  "aspect_ratios_selection": "1152×896",
  "image_number": 1,
  "image_seed": -1,
  "sharpness": 2,
  "guidance_scale": 4,
  "base_model_name": "juggernautXL_version6Rundiffusion.safetensors",
  "refiner_model_name": "None",
  "loras": [
    {
      "model_name": "sd_xl_offset_example-lora_1.0.safetensors",
      "weight": 0.1
    }
  ],
  "require_base64": false,
  "async_process": false
}'
konieshadow commented 10 months ago

It seems like you have wrong version of Fooocus in repositories folder. Just run python main.py --sync-repo only to update the Fooocus repository.

thiner commented 10 months ago

Yes, it's caused by version conflict. Solved already, thanks.