73 lines
2.8 KiB
C#
73 lines
2.8 KiB
C#
namespace MarketAlly.Replicate.Maui
|
|
{
|
|
public class ReplicateSettings
|
|
{
|
|
public string ApiToken { get; set; } = string.Empty;
|
|
public string ApiUrl { get; set; } = "https://api.replicate.com/v1/predictions";
|
|
|
|
/// <summary>
|
|
/// Authentication scheme to use. Options: "Bearer" (default per API docs) or "Token".
|
|
/// </summary>
|
|
public string AuthScheme { get; set; } = "Token";
|
|
|
|
// Image/Anime transformation settings
|
|
public string ModelVersion { get; set; } = string.Empty;
|
|
public string ModelName { get; set; } = string.Empty;
|
|
public int TimeoutSeconds { get; set; } = 300;
|
|
public int PollingDelayMs { get; set; } = 1500;
|
|
public string ImagePrompt { get; set; } = "anime style portrait, soft clean lines, studio ghibli or makoto shinkai inspired, friendly expression, elegant and simplified features, cinematic lighting";
|
|
|
|
// Video generation settings
|
|
public string VideoModelName { get; set; } = string.Empty;
|
|
public string VideoModelVersion { get; set; } = string.Empty;
|
|
public string VideoPrompt { get; set; } = "animate and loop if possible, do not change the text.";
|
|
public int VideoTimeoutSeconds { get; set; } = 600;
|
|
public int VideoPollingDelayMs { get; set; } = 3000;
|
|
|
|
public ImageTransformSettings DefaultSettings { get; set; } = new();
|
|
public VideoTransformSettings VideoSettings { get; set; } = new();
|
|
}
|
|
|
|
public class ImageTransformSettings
|
|
{
|
|
public int Seed { get; set; } = 42;
|
|
public double GuidanceScale { get; set; } = 9;
|
|
public double Strength { get; set; } = 0.8;
|
|
public int NumInferenceSteps { get; set; } = 30;
|
|
}
|
|
|
|
public class VideoTransformSettings
|
|
{
|
|
/// <summary>
|
|
/// Random seed for reproducible generation.
|
|
/// </summary>
|
|
public int? Seed { get; set; }
|
|
|
|
/// <summary>
|
|
/// Duration of the generated video in seconds. Only 5 or 10 are valid.
|
|
/// </summary>
|
|
public int Duration { get; set; } = 5;
|
|
|
|
/// <summary>
|
|
/// Video resolution and aspect ratio.
|
|
/// Valid values: "1280*720", "720*1280", "1920*1080", "1080*1920"
|
|
/// </summary>
|
|
public string Size { get; set; } = "1280*720";
|
|
|
|
/// <summary>
|
|
/// Audio file URL (wav/mp3, 3-30s, ≤15MB) for voice/music synchronization.
|
|
/// </summary>
|
|
public string? AudioUrl { get; set; }
|
|
|
|
/// <summary>
|
|
/// Negative prompt to avoid certain elements in the video.
|
|
/// </summary>
|
|
public string? NegativePrompt { get; set; }
|
|
|
|
/// <summary>
|
|
/// If true, the prompt optimizer will be enabled.
|
|
/// </summary>
|
|
public bool EnablePromptExpansion { get; set; } = true;
|
|
}
|
|
}
|