I'm trying to create a wordpress php connction to a stable diffusion model on replicate.com. It seems to work but when i'm adding an init image the processing won't start. Actually it halts on "status: starting" with no output prompts. I can see the image on my api prediction on the replicate Dashboard, but i think the image isn't really uploaded. When i click "Tweek" and replaces the image it works. What am i doing wrong here?
curl_setopt($resource, CURLOPT_URL, 'https://api.replicate.com/v1/predictions');
curl_setopt($resource, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($resource, CURLOPT_POST, 1);
$data = array(
'version' => '56f26876a159c10b429c382f66ccda648c1d5678d7ce15ed010734b715be5ab9',
'input' => array(
'prompt' => 'circles',
'init_image' => 'https://example.com/wp-content/uploads/img.jpg'
)
);
curl_setopt($resource, CURLOPT_POSTFIELDS, json_encode($data));
$headers = array();
$headers[] = 'Authorization: Token njdscknjk3nkjn32nk3jn3j';
$headers[] = 'Content-Type: application/json';
curl_setopt($resource, CURLOPT_HTTPHEADER, $headers);
$output = curl_exec($resource);
Content-Type: application/json.