Hello
Why in n8n FLUX.1-dev creates only square images? And how to make horizontal ones. The dimensions don’t work in promt.
I’m using HTTP Request
prompt = “{{ $json.message.text }}”
out = pipe(
prompt=prompt,
guidance_scale=3.5,
height=1360,
width=768,
num_inference_steps=50,
).images[0]
out.save(“image.png”)
but it doesn’t work - the output is always a square image
Franz
2
Please share the complete node (Copy + Paste between </> tags).
So we can take a deeper look on how send the parameters.
1 Like
Thank you for your reply
</>
{
“parameters”: {
“method”: “POST”,
“url”: “https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-dev”,
“authentication”: “genericCredentialType”,
“genericAuthType”: “httpHeaderAuth”,
“sendHeaders”: true,
“headerParameters”: {
“parameters”: [
{
“name”: “Accept”,
“value”: “image/png”
}
]
},
“sendBody”: true,
“bodyParameters”: {
“parameters”: [
{
“name”: “inputs”,
“value”: “=prompt = "{{$json.choices[0].message.content}}"\nout = pipe(\n prompt=prompt,\n guidance_scale=3.5,\n height=1080,\n width=600,\n num_inference_steps=50,\n).images[0]\nout.save("image.png")”
}
]
},
“options”: {
“response”: {
“response”: {
“responseFormat”: “file”
}
}
}
},
“id”: “57b61ebe-fe07-4b72-92bb-8051683c9db2”,
“name”: “Generate Image”,
“type”: “n8n-nodes-base.httpRequest”,
“position”: [
2600,
1500
],
“notesInFlow”: true,
“typeVersion”: 4.2,
“credentials”: {
“httpHeaderAuth”: {
“id”: “M1VRpeC7PfRZTzqx”,
“name”: “Header Auth account 2”
}
},
“onError”: “continueErrorOutput”,
“notes”: “Bearer\n\nprompt = "{{ $json.message.text }}"\nout = pipe(\n prompt=prompt,\n guidance_scale=3.5,\n height=1080,\n width=600,\n num_inference_steps=50,\n).images[0]\nout.save("image.png")”
}
</>