Skip to content

Commit

Permalink
🐛 fix(controller): correct prompt formatting in message output
Browse files Browse the repository at this point in the history
  • Loading branch information
sudoskys committed Sep 28, 2024
1 parent 78f32ed commit cec18d7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,16 @@ async def read_a111(file: BytesIO):
prompt = ",".join(prompt)
negative_prompt = ",".join(negative_prompt)
info = ",".join(info)
message = f"{prompt}\n{negative_prompt}\n{info}"
message = f"{negative_prompt}\n{info}"
while "\n\n" in message:
message = message.replace("\n\n", "\n")
while "\n\n" in prompt:
prompt = prompt.replace("\n\n", "\n")
except Exception as e:
logger.debug(f"Error {e}")
return []
else:
return [f"**📦 Prompt**\n>{message}\n"]
return [f"**📦 Prompt**\n```{prompt}```", f"\n>{message}\n"]


async def read_comfyui(file: BytesIO):
Expand Down

0 comments on commit cec18d7

Please sign in to comment.