Update lollms_comfyui.py

This commit is contained in:
Saifeddine ALOUI 2024-06-16 03:05:15 +02:00 committed by GitHub
parent 3fe79470ad
commit 8446e5b51b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -293,7 +293,8 @@ class LollmsComfyUI(LollmsTTI):
return response.read()
def get_history(prompt_id):
with request.urlopen("http://{}/history/{}".format(url, prompt_id)) as response:
url_values = "http://{}/history/{}".format(url, prompt_id)
with request.urlopen(url_values) as response:
return json.loads(response.read())
def get_images(ws, prompt):
@ -410,6 +411,9 @@ class LollmsComfyUI(LollmsTTI):
#set the text prompt for our positive CLIPTextEncode
prompt["1"]["inputs"]["positive"] = prompt_text
prompt["1"]["inputs"]["negative"] = negative_prompt
prompt["1"]["inputs"]["empty_latent_width"] = width
prompt["1"]["inputs"]["empty_latent_height"] = height
prompt["1"]["inputs"]["base_ckpt_name"] = self.app.config.comfyui_model
ws = websocket.WebSocket()