|
@@ -70,7 +70,7 @@ def get_prompt(ai_scene_info):
|
|
# image_depth_path = image_path + "depth0001.png"
|
|
# image_depth_path = image_path + "depth0001.png"
|
|
|
|
|
|
prompt = json.loads(prompt_text_json)
|
|
prompt = json.loads(prompt_text_json)
|
|
- set_filename(prompt, "Save Image", "custom/basic_api_example")
|
|
|
|
|
|
+ set_filename(prompt, "Save Image", "{project_id}/basic_api_example".format(project_id=ai_scene_info["project_id"]))
|
|
|
|
|
|
ksampler_main = find_node(prompt, "KSampler")
|
|
ksampler_main = find_node(prompt, "KSampler")
|
|
ksampler_main["inputs"]["noise_seed"] = random.randint(0, 1000000)
|
|
ksampler_main["inputs"]["noise_seed"] = random.randint(0, 1000000)
|
|
@@ -149,7 +149,9 @@ def main():
|
|
except Exception as e:
|
|
except Exception as e:
|
|
print("Error:", e)
|
|
print("Error:", e)
|
|
|
|
|
|
- prompt = get_prompt(ai_scene_info)
|
|
|
|
|
|
+ prompt = get_prompt(
|
|
|
|
+
|
|
|
|
+ )
|
|
|
|
|
|
ws = websocket.WebSocket()
|
|
ws = websocket.WebSocket()
|
|
ws.connect("ws://{}/ws?clientId={}".format(server_address, client_id))
|
|
ws.connect("ws://{}/ws?clientId={}".format(server_address, client_id))
|