Skip to content

Generating images using replicate - failing #1537

Open
@thadius83

Description

@thadius83

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

  • I searched previous Bug Reports didn't find any similar reports.

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?

  • Android
  • iPhone/iPad
  • Linux
  • macOS
  • Windows

Acknowledgements

  • My issue title is concise, descriptive, and in title casing.
  • I have searched the existing issues to make sure this bug has not been reported yet.
  • I am using the latest version of AgentGPT.
  • I have provided enough information for the maintainers to reproduce and diagnose the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions