FusionBrain 1.0.1
dotnet add package FusionBrain --version 1.0.1
NuGet\Install-Package FusionBrain -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FusionBrain" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FusionBrain --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FusionBrain, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install FusionBrain as a Cake Addin #addin nuget:?package=FusionBrain&version=1.0.1 // Install FusionBrain as a Cake Tool #tool nuget:?package=FusionBrain&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Non official fusion brain API client.
For actual official documentation please refer to https://fusionbrain.ai/docs/en/doc/api-dokumentaciya/
Features
- Getting available models -
GetModelsAsync
. - Generation image
- Auto polling result status -
GenerateImageAsync
- Manual pooling result status -
StartGenerateAsync
+GetGenerationStatusAsync
- Auto polling result status -
Steps for start
Configure
ImageGeneratorSettings
.BaseUrl
andAuthentication
are mandatory.CheckGeneration
are not mandatory with default values (Attempts
= 10 +Delay
= 10 seconds)
Create instance of
IImageGeneratorClient
.- Use can use DI way or manually configuring, meanwhile you can
use
ConfigureImageGeneratorHttpClient
HttpClient
extension for simplify authentication configuration.
- Use can use DI way or manually configuring, meanwhile you can
use
Get existing models by
GetModelsAsync
methodUse one of model for creating
GeneratingImage
- Example:
var generatingImage = new GeneratingImage( query: "<YOUR REQUEST>", excludingResultQuery: "<YOUR NEGATIVE PROMPT>", size: Size.Size1024X1024, numberOfImages: 1, // At now supporting only 1 image per request. mode: GenerationMode.Generate, // At now supporting only 1 mode - "GENERATE". model: model, // Model from step 4 style: Style.Anime // One of style, available styles by API - https://cdn.fusionbrain.ai/static/styles/api)
- Example:
Make request with auto or manual pooling result.
- Auto.
- Use
IImageGeneratorClient.GenerateAsync()
, result will be collection of images withprocessingId
and content byte array.
- Use
- Manual
- Use
IImageGeneratorClient.StartGenerateAsync()
, result will be status with processing id and array of by arrays of caseDone
status (one of which is image byte array content). - Depending on your application's polling configuration use
IImageGeneratorClient.GetGenerationStatusAsync()
to get actual status generation.- Additionally u can get
GeneratedImage
byToGeneratedImages
collection of byte array extension.
- Additionally u can get
- Use
- At each request you must have processing
Model
and sometimesprocessingId
.
- Auto.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Options (>= 8.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.