forked from cgvr/DeltaVR
trellis and invokeAI urls configurable in config
This commit is contained in:
@@ -14,9 +14,7 @@ public class InvokeAiClient : MonoBehaviour
|
||||
{
|
||||
public static InvokeAiClient Instance { get; private set; }
|
||||
|
||||
public string INVOKEAI_BASE_URL;
|
||||
public string DEFAULT_QUEUE_ID = "default";
|
||||
public string MODEL_KEY;
|
||||
public string promptSuffix = ", single object, front and side fully visible, realistic style, plain neutral background, clear details, soft studio lighting, true-to-scale";
|
||||
|
||||
private HttpClient httpClient;
|
||||
@@ -27,7 +25,7 @@ public class InvokeAiClient : MonoBehaviour
|
||||
{
|
||||
Timeout = TimeSpan.FromSeconds(120)
|
||||
};
|
||||
httpClient.BaseAddress = new Uri(INVOKEAI_BASE_URL);
|
||||
httpClient.BaseAddress = new Uri(ConfigManager.Instance.Config.invokeAIUrl);
|
||||
|
||||
Instance = this;
|
||||
}
|
||||
@@ -520,13 +518,14 @@ public class InvokeAiClient : MonoBehaviour
|
||||
|
||||
public async Task<byte[]> GenerateImage(string prompt)
|
||||
{
|
||||
string modelKey = ConfigManager.Instance.Config.invokeAIModelKey;
|
||||
string refinedPrompt = prompt + promptSuffix;
|
||||
JObject args = new JObject()
|
||||
{
|
||||
["prompt"] = refinedPrompt,
|
||||
["width"] = 512,
|
||||
["height"] = 512,
|
||||
["model_key"] = MODEL_KEY,
|
||||
["model_key"] = modelKey,
|
||||
};
|
||||
|
||||
UnityEngine.Debug.Log("Starting image generation...");
|
||||
|
||||
Reference in New Issue
Block a user