lzell / AIProxySwift

Client for AIProxy
https://www.aiproxy.pro
73 stars 9 forks source link

Adopt replicate synchronous API for Flux generations #60

Closed lzell closed 1 month ago

lzell commented 1 month ago
MartinW commented 1 month ago

@lzell Thanks for all the work on this, it's much quicker.

replicateService.createPrediction previously allowed any type for the input. I created my own schema to also pass in hfLora, loraScale and guidanceScale.

createFluxSchnellImageURLs does not allow this. Could it? I can’t override it as it's final class.

lzell commented 1 month ago

Whoops, hey @MartinW. I would like to keep generics out of createFluxSchnellImageURLs as it's intended to be easier to use than the the general interfaces. But we can certainly accommodate your needs with a couple approaches:

  1. Get rid of all final class definitions so you can customize as you see fit outside of the lib
  2. Add the properties that you need to the flux schema. I'm curious, though, because I don't see hf_lora, lora_scale, and guidance_scale on the schnell schema. Are you seeing your image generations affected by those properties?
lzell commented 1 month ago

@MartinW all public classes in the SDK are now open. Thank you for the feedback: https://github.com/lzell/AIProxySwift/pull/65