Sergiu 9 mesiacov pred
rodič
commit
34ebde4773
1 zmenil súbory, kde vykonal 4 pridanie a 2 odobranie
  1. 4 2
      04_stable_diffusion/sd_comfy_api_v2.py

+ 4 - 2
04_stable_diffusion/sd_comfy_api_v2.py

@@ -70,7 +70,7 @@ def get_prompt(ai_scene_info):
     # image_depth_path = image_path + "depth0001.png"
 
     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["inputs"]["noise_seed"] = random.randint(0, 1000000)
@@ -149,7 +149,9 @@ def main():
     except Exception as e:
         print("Error:", e)
 
-    prompt = get_prompt(ai_scene_info)    
+    prompt = get_prompt(
+        
+    )    
 
     ws = websocket.WebSocket()
     ws.connect("ws://{}/ws?clientId={}".format(server_address, client_id))