StefH / Replicate.Net

A C# RestEase client for Replicate (A latent text-to-image diffusion model capable of generating photo-realistic images given any text input).
MIT License
17 stars 5 forks source link

reporting an error when uploading the file. #8

Closed bh4rep closed 1 year ago

bh4rep commented 1 year ago

How to support the call of the model of Jagilley/ControlNet-Hough, reporting an error when uploading the file.

StefH commented 1 year ago

Please provide a full working example code.

bh4rep commented 1 year ago
 Dim Factory As New Replicate.Net.Factory.ReplicateApiFactory
        Dim api = Factory.GetApi("66d844f9************************")
        Dim input As New Replicate.Net.Models.PredictionInput
        input.Prompt = "a big house"
        input.InitImage = "D:\rrr.jpg"
        input.NumberOfOutputs = 1
        'Dim bs() As Byte = File.ReadAllBytes("D:\rrr.jpg")
        'Dim ss As String = "data:image/jpeg; " & Convert.ToBase64String(bs)
        'input.InitImage = ss
        Dim request As New Replicate.Net.Models.Request
        request.Version = "854e8727697a057c525cdb45ab037f64ecca770a1769cc52287c2e56472a247b"
        request.Input = input
        Dim response = Await api.CreatePredictionAndWaitOnResultAsync(request).ConfigureAwait(False)
        Dim a As String = response.Output(0).ToString
        Dim s As String = a
bh4rep commented 1 year ago

Are there any places to modify? The request is that the returned InitImage value is empty.

StefH commented 1 year ago

I need to debug this call.

I'll keep you updated.

bh4rep commented 1 year ago

var Factory = new Replicate.Net.Factory.ReplicateApiFactory(); var api = Factory.GetApi("66d844f9****"); var input = new Replicate.Net.Models.PredictionInput(); input.Prompt = "a big house"; input.InitImage = @"D:\rrr.jpg"; input.NumberOfOutputs = 1; // Dim bs() As Byte = File.ReadAllBytes("D:\rrr.jpg") // Dim ss As String = "data:image/jpeg; " & Convert.ToBase64String(bs) // input.InitImage = ss var request = new Replicate.Net.Models.Request(); request.Version = "854e8727697a057c525cdb45ab037f64ecca770a1769cc52287c2e56472a247b"; request.Input = input; var response = Await; / TODO ERROR: Skipped SkippedTokensTrivia api// TODO ERROR: Skipped SkippedTokensTrivia .CreatePredictionAndWaitOnResultAsync(request).ConfigureAwait(False)/ string a = response.Output(0).ToString; string s = a;

bh4rep commented 1 year ago

Improved webhook events and event filtering February 10, 2023 When you create a prediction with the API, you can provide a webhook URL for us to call when your prediction is complete. Starting today, we now send more webhook events at different stages of the prediction lifecycle. We send requests to your webhook URL whenever there are new logs, new outputs, or the prediction has finished.

13905156213

From: Stef Heyenrath Date: 2023-03-21 22:00 To: StefH/Replicate.Net CC: bh4rep; Author Subject: Re: [StefH/Replicate.Net] reporting an error when uploading the file. (Issue #8) I need to debug this call. I'll keep you updated. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

bh4rep commented 1 year ago

How can I submit a URL of a webhook?

StefH commented 1 year ago

@bh4rep init_image should be: This image should be uploaded to a publicly accessible HTTP URL and that URL string should be used for this property.

I've added this to the comments for the model.


webhook --> create a new issue

bh4rep commented 1 year ago

thanks.

13905156213

From: Stef Heyenrath Date: 2023-03-22 18:53 To: StefH/Replicate.Net CC: bh4rep; Mention Subject: Re: [StefH/Replicate.Net] reporting an error when uploading the file. (Issue #8) @bh4rep init_image should be: This image should be uploaded to a publicly accessible HTTP URL and that URL string should be used for this property. I've added this to the comments for the model.

webhook --> create a new issue — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>