* Updated

This commit is contained in:
Daniel Legt 2023-05-04 16:26:42 +03:00
parent b154af3c73
commit 80a3924f22
2 changed files with 8 additions and 3 deletions

View File

@ -13,7 +13,7 @@ import (
)
const (
NEGATIVE_PROMPT = "(nsfw:1.1), (porn:1.1), (naked:1.1), (nude:1.1), (nipple:1.1), (penis:1.1), (dick:1.1), (vagina:1.1), (asshole:1.1), visible nipple, nsfl, not safe for work, nudity, artifact, deformed, multiple limbs, ugly, gore, blood, sex, pornography, penis, dick, genitalia, male genitalia, anus, penetration, double penetration, cock"
NEGATIVE_PROMPT = "easynegative, (nsfw:1.1), (porn:1.1), (naked:1.1), (nude:1.1), (nipple:1.1), (penis:1.1), (dick:1.1), (vagina:1.1), (asshole:1.1), visible nipple, nsfl, not safe for work, nudity, artifact, deformed, multiple limbs, ugly, gore, blood, sex, pornography, penis, dick, genitalia, male genitalia, anus, penetration, double penetration, cock"
)
var nodes [1]rtypes.SDNode = [...]rtypes.SDNode{
@ -81,13 +81,14 @@ func main() {
func generateProdiaImage(c *gin.Context) {
imageDescriptior := c.PostForm("image_description")
negativePrompt := c.PostForm("negative_prompt")
if goaway.IsProfane(imageDescriptior) {
imageDescriptior = goaway.Censor(imageDescriptior)
fmt.Printf("Found profanity, censoring to: %s\n", imageDescriptior)
}
resp, err := prodia.RequestGeneration(imageDescriptior, NEGATIVE_PROMPT)
resp, err := prodia.RequestGeneration(imageDescriptior, fmt.Sprintf("%s,%s", negativePrompt, NEGATIVE_PROMPT))
if err != nil {
c.AbortWithError(500, err)
return

View File

@ -62,7 +62,11 @@
</div>
</div>
<div style="display: flex; flex-flow: column; padding: 0; margin: 0; margin-top: .5rem">
<textarea name="image_description" id="image_description" rows="10" class="t95"></textarea>
<span>Prompt</span>
<textarea name="image_description" id="image_description" rows="10" class="t95" placeholder="Prompt" style="margin-bottom: .5rem"></textarea>
<span>Negative Prompt</span>
<textarea name="negative_prompt" id="negative_prompt" rows="10" class="t95" placeholder="Negative Prompts">worst quality, corrupt, artifact, bad artist, noise, out of frame, duplicate, watermark, signature, text, morbid, blurry, bad proportions, disfigured</textarea>
<div style="display: flex; flex-flow: row; align-items: center; justify-content: center; margin: .5rem 0">
<button class="btn-95" style="width: calc(50% - .25rem); margin-right: .25rem">Generate Image</button>
<button class="btn-95" style="width: calc(50% - .25rem); margin-left: .25rem" id="random-prompt-button">Random Prompt</button>