feat: expose IP-Adapter in server request schema and capabilities#1824
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The server could load an IP-Adapter model via
--ip-adapterat startup, but the per-request JSON path never read the reference image or strength, so IP-Adapter was unusable from the server and the fields were absent from/sdcpp/v1/capabilities.This wires the two per-request fields through the same path the existing
control_image/control_strengthfields use:ip_adapter_strength(number) andip_adapter_image(3-channel image) are now parsed infrom_json_str, advertised in the img_gen defaults and features, and documented inapi.md. No new endpoints or parameters beyond mirroring the existing control-image pattern.Related Issue / Discussion
Follow-up to #1803 (IP-Adapter support). Missing server support was reported in a comment on that PR.
Additional Information
Verified end-to-end against a running
sd-serverloaded with--ip-adapter ip-adapter_sd15.safetensors --clip_vision clip_vision_h.safetensors:GET /sdcpp/v1/capabilitiesnow listsip_adapter_image(features) andip_adapter_strength(defaults).POST /sdcpp/v1/img_genwith a base64ip_adapter_imagecompletes with an image, and the server logsIP-Adapter: 4 image tokens, strength 1.00, confirming the request-supplied reference drives the adapter.Checklist