mirror of
https://github.com/DarthAffe/StableDiffusion.NET.git
synced 2025-12-12 13:28:35 +00:00
Added chroma model parameters
This commit is contained in:
parent
bbf5743143
commit
89cf3108df
@ -61,7 +61,10 @@ public sealed unsafe class DiffusionModel : IDisposable
|
||||
ModelParameter.KeepClipOnCPU,
|
||||
ModelParameter.KeepControlNetOnCPU,
|
||||
ModelParameter.KeepVaeOnCPU,
|
||||
ModelParameter.FlashAttention);
|
||||
ModelParameter.FlashAttention,
|
||||
ModelParameter.ChromaUseDitMap,
|
||||
ModelParameter.ChromaEnableT5Map,
|
||||
ModelParameter.ChromaT5MaskPad);
|
||||
|
||||
if (_ctx == null) throw new NullReferenceException("Failed to initialize diffusion-model.");
|
||||
}
|
||||
|
||||
@ -109,6 +109,11 @@ public sealed class DiffusionModelParameter : IDiffusionModelParameter, IQuantiz
|
||||
/// </summary>
|
||||
public string T5xxlPath { get; set; } = string.Empty;
|
||||
|
||||
// Flux Chroma specific
|
||||
public bool ChromaUseDitMap { get; set; } = true;
|
||||
public bool ChromaEnableT5Map { get; set; } = false;
|
||||
public int ChromaT5MaskPad { get; set; } = 1;
|
||||
|
||||
// SD3.5 only
|
||||
/// <summary>
|
||||
/// path to the clip-g text encoder
|
||||
|
||||
@ -70,7 +70,10 @@ internal unsafe partial class Native
|
||||
[MarshalAs(UnmanagedType.I1)] bool keep_clip_on_cpu,
|
||||
[MarshalAs(UnmanagedType.I1)] bool keep_control_net_cpu,
|
||||
[MarshalAs(UnmanagedType.I1)] bool keep_vae_on_cpu,
|
||||
[MarshalAs(UnmanagedType.I1)] bool diffusion_flash_attn);
|
||||
[MarshalAs(UnmanagedType.I1)] bool diffusion_flash_attn,
|
||||
[MarshalAs(UnmanagedType.I1)] bool chroma_use_dit_mask,
|
||||
[MarshalAs(UnmanagedType.I1)] bool chroma_use_t5_mask,
|
||||
int chroma_t5_mask_pad);
|
||||
|
||||
[LibraryImport(LIB_NAME, EntryPoint = "free_sd_ctx")]
|
||||
internal static partial void free_sd_ctx(sd_ctx_t* sd_ctx);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user