trellis and invokeAI urls configurable in config

This commit is contained in:
2026-01-19 18:55:25 +02:00
parent 4292750b65
commit ad6954884b
8 changed files with 83 additions and 10 deletions

View File

@@ -9,16 +9,16 @@ public class TrellisClient : MonoBehaviour
{
public static TrellisClient Instance { get; private set; }
public string TRELLIS_BASE_URL;
private HttpClient httpClient;
private void Awake()
{
httpClient = new HttpClient();
httpClient.BaseAddress = new Uri(TRELLIS_BASE_URL);
httpClient.BaseAddress = new Uri(ConfigManager.Instance.Config.TrellisUrl);
Instance = this;
TestConnection();
}
// Start is called before the first frame update
@@ -33,6 +33,12 @@ public class TrellisClient : MonoBehaviour
}
private async void TestConnection()
{
var statusResp = await httpClient.GetAsync("status");
Debug.Log("Trellis status: " + statusResp.StatusCode);
}
public async Task<byte[]> GenerateModel(
string imageBase64,