dsebastien / obsidian-replicate

Integrate Replicate.com with Obsidian
MIT License
3 stars 0 forks source link

Replace variable image generation settings by an image generation configuration object (any) #1

Closed dsebastien closed 1 month ago

dsebastien commented 1 month ago

Image generation models all support different settings with different values/scales/etc. AFAIK there's no clearly defined schema for each, so it's difficult to model

The current approach, with pre-defined settings for the image generation model won't work. Instead, we need a simple textarea with freeform input where users should insert a valid JSON object containing the configuration settings of the chosen model. Up to them to configure that correctly.

Example for https://replicate.com/black-forest-labs/flux-pro:

{
  "steps": 25,
  "prompt": "The world's largest black forest cake, the size of a building, surrounded by trees of the black forest",
  "guidance": 3,
  "interval": 2,
  "aspect_ratio": "1:1",
  "safety_tolerance": 5
}
remimarechal commented 1 month ago

good to move forward by simplifying

in a future version, you can consider using the schema provided by the following operation to dynamically generate configuration forms: https://replicate.com/docs/reference/http#get-a-model-version

also, it will require special variables (and interpolation syntax) to bind the prompt with the expected field in the payload