-
Notifications
You must be signed in to change notification settings - Fork 983
Adds Negative Prompts #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
let hiddenStates = toHiddenStates(concatEmbedding) | ||
|
||
/// Setup schedulers | ||
let scheduler = (0..<imageCount).map { _ in DPMSolverMultistepScheduler(stepCount: stepCount) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there actually a Swift implementation of DPMSolverMultistepScheduler? Unfortunately I couldn't get this to compile. 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, good catch. I was using a PR #59 for the DPMSolverMultistepScheduler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed with b6787e1
@JustinMeans I've taken the liberty of fixing the conflicts and also added a CLI option for the negative prompt here: mfellner#2 Feel free to pull the changes into this PR. |
Hello @JustinMeans, thank you for your interest in contributing to Core ML Stable Diffusion! Please review CONTRIBUTING.md. If you would like to proceed with this pull request, please indicate your agreement to the terms outlined in CONTRIBUTING.md by checking the box below. We appreciate your interest in the project!
|
Please note that a later PR (#76) implements the same feature in fewer line changes but we wanted to see if you would want to revise your PR to minimize the line changes as you submitted earlier (FIFO). I will be on standby for 48 hours to hear from you and then merge #76 instead if I don't hear back. Thank you again! |
|
Hi @atiorh, thanks for the note. I've gone ahead and re-synced this PR and re-implemented to minimize line changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be ready to go. Thanks @mfellner for the help.
Cool, this is very similar to #76 now so I will manually add @Wanaldino as a co-author in the merge commit. Thanks for the contribution both! |
* commit 'e07c4d00c387840f70fa3701fb3a51c2a32f37b8': Move guidanceScale as generation parameter (apple#46) Add brief instructions to download weights from the Hub (apple#10) Adds Negative Prompts (apple#61) Changed seed type into UInt32 (apple#47) fixes apple#77 Update README.md (apple#66) Add Filename Character Limit (apple#19) Implement DPM-Solver++ scheduler (apple#59) Fix typos: Successfully facilitate getting pipeline overridden (apple#30) Undefined name: from typing import List (apple#31) Add Availability Annotations (apple#18) README improvements and reduceMemory option in Swift
When I use --negative-prompt option for several cases, only one word were able. is there way to use various word for this? |
Adds a negativePrompt parameter to generateImages and produces a prompt embedding by concatenating the negative and positive prompt encodings.