forked from TensorStack-AI/TensorStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPipelineConfig.cs
More file actions
60 lines (43 loc) · 1.85 KB
/
PipelineConfig.cs
File metadata and controls
60 lines (43 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
using System.Collections.Generic;
using System.Text.Json.Serialization;
using TensorStack.Python.Common;
namespace TensorStack.Python.Config
{
public sealed record PipelineConfig
{
[JsonPropertyName("base_model_path")]
public string BaseModelPath { get; set; }
[JsonPropertyName("pipeline")]
public string Pipeline { get; set; }
[JsonPropertyName("process_type")]
public ProcessType ProcessType { get; set; }
[JsonPropertyName("device")]
public string Device { get; set; } = "cuda";
[JsonPropertyName("device_id")]
public int DeviceId { get; set; }
[JsonPropertyName("device_bus_id")]
public int DeviceBusId { get; set; }
[JsonPropertyName("data_type")]
public DataType DataType { get; set; } = DataType.Bfloat16;
[JsonPropertyName("quant_type")]
public QuantizationType QuantType { get; set; }
[JsonPropertyName("is_optimize_device_enabled")]
public bool IsOptimizeDeviceEnabled { get; set; } = false;
[JsonPropertyName("is_optimize_channels_enabled")]
public bool IsOptimizeChannelsEnabled { get; set; } = false;
[JsonPropertyName("variant")]
public string Variant { get; set; }
[JsonPropertyName("cache_directory")]
public string CacheDirectory { get; set; }
[JsonPropertyName("secure_token")]
public string SecureToken { get; set; }
[JsonPropertyName("lora_adapters")]
public List<LoraConfig> LoraAdapters { get; set; }
[JsonPropertyName("control_net")]
public ControlNetConfig ControlNet { get; set; }
[JsonPropertyName("memory_mode")]
public MemoryModeType MemoryMode { get; set; }
[JsonPropertyName("checkpoint_config")]
public CheckpointConfig CheckpointConfig { get; set; }
}
}