reworkd / AgentGPT

🤖 Assemble, configure, and deploy autonomous AI Agents in your browser.
https://agentgpt.reworkd.ai
GNU General Public License v3.0
31.48k stars 9.22k forks source link

Generating images using replicate - failing #1537

Open thadius83 opened 5 months ago

thadius83 commented 5 months ago

Please check that this issue hasn't been reported before.

Expected Behavior

An image should be generated based on a users input

Current behaviour

The interface returns "Failed to Fetch"

The cli logs report the following error

TypeError: _create_prediction_body() got an unexpected keyword argument 'image_dimensions'

i.e.

platform | File "/app/src/reworkd_platform/web/api/agent/tools/image.py", line 62, in call platform | url = await get_replicate_image(input_str) platform | │ └ 'Generate an image of a pink donut with green sprinkles' platform | └ <function get_replicate_image at 0x7f3bcf38b4c0> platform | platform | File "/app/src/reworkd_platform/web/api/agent/tools/image.py", line 21, in get_replicate_image platform | output = client.run( platform | │ └ <function Client.run at 0x7f3bcf18d620> platform | └ <replicate.client.Client object at 0x7f3bcc3e7390> platform | platform | File "/usr/local/lib/python3.11/site-packages/replicate/client.py", line 157, in run platform | return run(self, ref, input, **params) platform | │ │ │ │ └ {'image_dimensions': '512x512'} platform | │ │ │ └ {'prompt': 'Generate an image of a pink donut with green sprinkles'} platform | │ │ └ 'stability-ai/stable-diffusion:db21e45d3f7023abc2a46ee38a23973f6dce16bb082a930b0c49861f96d1e5bf' platform | │ └ <replicate.client.Client object at 0x7f3bcc3e7390> platform | └ <function run at 0x7f3bcf15b920> platform | File "/usr/local/lib/python3.11/site-packages/replicate/run.py", line 40, in run platform | prediction = client.predictions.create( platform | │ └ <property object at 0x7f3bcf1860c0> platform | └ <replicate.client.Client object at 0x7f3bcc3e7390> platform | File "/usr/local/lib/python3.11/site-packages/replicate/prediction.py", line 393, in create platform | body = _create_prediction_body( platform | └ <function _create_prediction_body at 0x7f3bcf113880> platform | platform | TypeError: _create_prediction_body() got an unexpected keyword argument 'image_dimensions' `

image

image

Steps to reproduce

Repeatable every time

Images are not generated or displayed

prompts used are "Generate me an image of xyz"

Valid replicate account

Possible solution

No response

Which Operating Systems are you using?

Acknowledgements