Skip to content

Conversation

@apolinario
Copy link
Contributor

Addressing comments left on #907, specially for LoRAs

Addressing comments left on #907, specially for LoRAs
@mishig25
Copy link
Collaborator

mishig25 commented Sep 18, 2024

looking great!

regarding this line:

prompt = "${get_prompt_from_diffusers_model(model) ?? diffusersDefaultPrompt}"

I think there can be edge case where user supplied prompt has quote like ", which means we need to escape ".
Otherwise, there is a danger of producing broken python code like:

prompt = "Astronaut holding sign that says "Hello"" # which is that it is now

prompt = "Astronaut holding sign that says \"Hello\"" # which is what it should be

@apolinario apolinario marked this pull request as ready for review September 18, 2024 10:27
Copy link
Member

@Vaibhavs10 Vaibhavs10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conceptually looks great to me! Thanks for taking this to the finish line! 🐐

@Vaibhavs10 Vaibhavs10 requested a review from mishig25 September 19, 2024 11:30
@mishig25 mishig25 merged commit f1c2b27 into main Sep 19, 2024
3 of 5 checks passed
@mishig25 mishig25 deleted the diffusers-prompting-improvements branch September 19, 2024 13:46
mishig25 added a commit that referenced this pull request Sep 20, 2024
mishig25 added a commit that referenced this pull request Sep 20, 2024
mishig25 added a commit that referenced this pull request Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants