I am trying to use the black-forest-labs/flux.1-dev model in my node app to create an image based on an input image, which the model seems to support when using the canny or depth mode.
The problem lies in the image field. When I use the image field given in the sandbox run: “data:image/png;example_id,0”, it works fine, however using a custom Base64 image which follows the same format, it does not work. I also monitored the network calls when using the sandbox and clearly saw the same string used so it seems like it does not accept any custom images.
Am I bound to only using the 4 sample images that the sandbox shows? Or is there some other way that I should be passing in images besides base64?
Here is the error I receive when using base 64:
Error: Invocation failed: 422 - {"type":"urn:inference-service:problem-details:unprocessable-entity", "title":"Unprocessable Entity", "status":422, "detail":"Inference error"}
Here is my payload:
const payload = {
prompt: "prompt text",
mode: "depth",
image: imageDataURI,
cfg_scale: 3.5,
width: 1024,
height: 1024,
seed: 0,
steps: 50,
};