mrhan1993 / Fooocus-API

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

I Got "Worker error: too many indices for array: array is 2-dimensional, but 3 were indexed" when using image-inpait-outpaint #58

Closed mrhan1993 closed 8 months ago

mrhan1993 commented 10 months ago

with_points mask_0

I try use this 2 pic as input image and mask in Swagger page, and all other params are default, but got "Worker error: too many indices for array: array is 2-dimensional, but 3 were indexed" in command line, How should I use this interface or did I get the parameters wrong?

mrhan1993 commented 10 months ago
curl -X 'POST' \
  'http://192.168.5.222:8888/v1/generation/image-inpait-outpaint' \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'sharpness=2' \
  -F 'input_mask=@mask_0.png;type=image/png' \
  -F 'advanced_params=' \
  -F 'guidance_scale=4' \
  -F 'prompt=' \
  -F 'l1=sd_xl_offset_example-lora_1.0.safetensors' \
  -F 'input_image=@with_points.png;type=image/png' \
  -F 'l2=' \
  -F 'l3=' \
  -F 'l4=' \
  -F 'l5=' \
  -F 'require_base64=false' \
  -F 'async_process=false' \
  -F 'image_number=1' \
  -F 'negative_prompt=' \
  -F 'refiner_switch=0.5' \
  -F 'base_model_name=juggernautXL_version6Rundiffusion.safetensors' \
  -F 'image_seed=-1' \
  -F 'style_selections=Fooocus V2,Fooocus Enhance,Fooocus Sharp' \
  -F 'outpaint_selections=' \
  -F 'w1=0.1' \
  -F 'w2=0.1' \
  -F 'refiner_model_name=None' \
  -F 'aspect_ratios_selection=1152×896' \
  -F 'w3=0.1' \
  -F 'performance_selection=Speed' \
  -F 'w4=0.1' \
  -F 'w5=0.1'

here is the post data

konieshadow commented 10 months ago

@mrhan1993 Just fixed at v0.3.15. Thanks for feedback.

mrhan1993 commented 10 months ago

@mrhan1993 Just fixed at v0.3.15. Thanks for feedback.

is worked, thx for your work.

CyrusVorwald commented 8 months ago

This update isn't reflected in the replicate model, so the error still occurs there.

konieshadow commented 8 months ago

@CyrusVorwald Just updated the replicate model.

mrhan1993 commented 8 months ago

@konieshadow send a mail to your hotmail, have a look?