Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/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).
https://github.com/StefH/Replicate.Net
Last synced: 3 months ago
JSON representation
A C# RestEase client for Replicate (A latent text-to-image diffusion model capable of generating photo-realistic images given any text input).
- Host: GitHub
- URL: https://github.com/StefH/Replicate.Net
- Owner: StefH
- License: mit
- Created: 2022-09-14T16:41:45.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-19T09:26:36.000Z (9 months ago)
- Last Synced: 2024-04-14T13:08:13.902Z (7 months ago)
- Language: C#
- Size: 7.69 MB
- Stars: 16
- Watchers: 3
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-replicate - Replicate.Net - A C# RestEase client for Replicate. (Client libraries)
README
# ![Project Icon](https://raw.githubusercontent.com/StefH/Replicate.Net/main/resources/icon_32x32.png) Replicate.Net
A C# client (using [RestEase](https://github.com/canton7/RestEase)) for [Replicate](https://replicate.com): A latent text-to-image diffusion model capable of generating photo-realistic images given any text input.It implements the [HTTP API](https://replicate.com/docs/reference/http) from Replicate](https://replicate.com).
## Install
| | |
| - | - |
| [![NuGet Badge](https://buildstats.info/nuget/Replicate.Net)](https://www.nuget.org/packages/Replicate.Net) | Main project
| [![NuGet Badge](https://buildstats.info/nuget/Replicate.Net.DependencyInjection)](https://www.nuget.org/packages/Replicate.Net.DependencyInjection) | Support for Microsoft DependencyInjection## Example (using Factory)
``` c#
var factory = new PredictionsApiFactory();var replicateApi = factory.GetApi("{token}");
var request = new Request
{
Version = "a9758cbfbd5f3c2094457d996681af52552901775aa2d6dd0b17fd15df959bef",
Input = new DefaultPredictionInput
{
Prompt = "a gentleman cat with blue eyes wearing a tophat in a 19th century portrait"
}
};var response = await replicateApi.CreatePredictionAndWaitOnResultAsync(request).ConfigureAwait(false);
```## Example (using DependencyInjection)
``` c#
// ---
services.AddReplicateClient("{token}");
// ---var replicateApi = // injected
// Now call the api
```
## Example WinForms application
![example-winform](https://raw.githubusercontent.com/StefH/Replicate.Net/main/resources/example-winform.png)
### References
- https://replicate.com
- https://mpost.io/best-100-stable-diffusion-prompts-the-most-beautiful-ai-text-to-image-prompts/
- https://github.com/joelparkerhenderson/stable-diffusion-image-prompt-gallery