dreamingtulpa / replicate-ruby

Replicate Ruby client
60 stars 6 forks source link

Undefined local variable or method upload_url for Dreambooth end point #8

Closed AndreyAzimov closed 10 months ago

AndreyAzimov commented 11 months ago

I have an error when I'm trying to upload images in zip for Dreambooth end point: undefined local variable or method upload_url for #<Replicate::Record::Upload:0x0000000150397b68>

Here is my code:

class Dream

  require "replicate"

  def self.train
    Replicate.configure {|config| config.api_token = "r8_your_token"}
    upload = Replicate.client.upload_zip("tmp/data.zip")

    training = Replicate.client.create_training(
      input: {
        instance_prompt: "zwx style",
        class_prompt: "style",
        instance_data: upload.serving_url,
        max_train_steps: 5000
      },
      model: 'user/model'
    )
    return training
  end
end
dreamingtulpa commented 10 months ago

Didn't have the time to through this. Were you able to resolve this? What was the issue?