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

Advanced parameters don't get passed when inpainting. #411

Open
devnull75 opened this issue Jan 5, 2025 · 1 comment
Open

Advanced parameters don't get passed when inpainting. #411

devnull75 opened this issue Jan 5, 2025 · 1 comment

Comments

@devnull75
Copy link

When I run this:

curl -X 'POST' \
  'http://localhost:8888/v1/generation/image-inpaint-outpaint' \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'sharpness=2' \
  -F 'input_mask=@test_inpaint_hoodie_woman mask.jpg;type=image/jpeg' \
  -F 'outpaint_distance_right=0' \
  -F 'loras=[{"enabled":true,"model_name":"sd_xl_offset_example-lora_1.0.safetensors","weight":0.1},{"enabled":true,"model_name":"None","weight":1},{"enabled":true,"model_name":"None","weight":1},{"enabled":true,"model_name":"None","weight":1},{"enabled":true,"model_name":"None","weight":1}]' \
  -F 'outpaint_distance_left=0' \
  -F 'advanced_params=' \
  -F 'read_wildcards_in_order=false' \
  -F 'guidance_scale=4' \
  -F 'prompt=' \
  -F 'input_image=@test_inpaint_hoodie_woman.jpg;type=image/jpeg' \
  -F 'outpaint_distance_bottom=0' \
  -F 'save_meta=true' \
  -F 'webhook_url=' \
  -F 'require_base64=false' \
  -F 'async_process=false' \
  -F 'save_name=' \
  -F 'image_number=1' \
  -F 'negative_prompt=cloth around neck' \
  -F 'refiner_switch=0.5' \
  -F 'base_model_name=FluentlyXL-v4.safetensors' \
  -F 'image_seed=6091967260935476000' \
  -F 'style_selections=Fooocus V2,Fooocus Enhance,Fooocus Sharp' \
  -F 'inpaint_additional_prompt=a blonde model in a clothing store, modeling a designer hoodie. be sure to render entire neck area' \
  -F 'outpaint_selections=' \
  -F 'outpaint_distance_top=0' \
  -F 'refiner_model_name=None' \
  -F 'aspect_ratios_selection=1024*1024' \
  -F 'performance_selection=Quality' \
  -F 'save_extension=png' \
  -F 'meta_scheme=fooocus'

I get the same image as when I add the following to advanced_params:

[{"inpaint_disable_initial_latent":1, "inpaint_strength":1, "inpaint_respective_field":1, "inpaint_erode_or_dilate":64}]

curl -X 'POST' \
  'http://localhost:8888/v1/generation/image-inpaint-outpaint' \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'sharpness=2' \
  -F 'input_mask=@test_inpaint_hoodie_woman mask.jpg;type=image/jpeg' \
  -F 'outpaint_distance_right=0' \
  -F 'loras=[{"enabled":true,"model_name":"sd_xl_offset_example-lora_1.0.safetensors","weight":0.1},{"enabled":true,"model_name":"None","weight":1},{"enabled":true,"model_name":"None","weight":1},{"enabled":true,"model_name":"None","weight":1},{"enabled":true,"model_name":"None","weight":1}]' \
  -F 'outpaint_distance_left=0' \
  -F 'advanced_params=[{"inpaint_disable_initial_latent":1,"inpaint_strength":1,"inpaint_respective_field":1,"inpaint_erode_or_dilate":64}]' \
  -F 'read_wildcards_in_order=false' \
  -F 'guidance_scale=4' \
  -F 'prompt=' \
  -F 'input_image=@test_inpaint_hoodie_woman.jpg;type=image/jpeg' \
  -F 'outpaint_distance_bottom=0' \
  -F 'save_meta=true' \
  -F 'webhook_url=' \
  -F 'require_base64=false' \
  -F 'async_process=false' \
  -F 'save_name=' \
  -F 'image_number=1' \
  -F 'negative_prompt=cloth around neck' \
  -F 'refiner_switch=0.5' \
  -F 'base_model_name=FluentlyXL-v4.safetensors' \
  -F 'image_seed=6091967260935476000' \
  -F 'style_selections=Fooocus V2,Fooocus Enhance,Fooocus Sharp' \
  -F 'inpaint_additional_prompt=a blonde model in a clothing store, modeling a designer hoodie. be sure to render entire neck area' \
  -F 'outpaint_selections=' \
  -F 'outpaint_distance_top=0' \
  -F 'refiner_model_name=None' \
  -F 'aspect_ratios_selection=1024*1024' \
  -F 'performance_selection=Quality' \
  -F 'save_extension=png' \
  -F 'meta_scheme=fooocus'

Both curls return the same image, even the the advanced params I have add should change the image significantly.

@devnull75
Copy link
Author

Got working by removing array from the string {"inpaint_disable_initial_latent":1, "inpaint_strength":1, "inpaint_respective_field":1, "inpaint_erode_or_dilate":64}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant