Git Product home page Git Product logo

extension-style-vars's Introduction

Style variables SD extension

Use styles or parts of them as variables inside the prompt.

Motivation

This extension offers a more flexible use of styles. By using them as variables you can easily control the position of the styles more freely.

You can also use styles inside prompt editing for example:
[$style1|$style2]
which is not possible with the native use of styles.

Syntax

$style will be replaced with the style text
$(a style) parentheses can be used if the style name has spaces
$1style or $1(style) can be used to select the first part of a style. Parts are separated by {prompt}
You can have any number of parts by having multiple {prompt} in the style and using $2, $3, etc...
$style will be replaced by the negative part of the style when used in the negative prompt

Extra features (new)

All extra features can be toggled individually in settings, syntax based features are off by default to prevent conflict with other extensions.

Original prompt save and load

Saves the original prompt into parameters to preserve style variables, random and hires prompting syntax when loading prompt data.

Prompt randomization

Basic prompt randomization {one|two|three} chooses one of the choices randomly (basic version of dynamic prompts)

Unlike dynamic prompts, this can be nested with itself or even with other syntax like prompt editing [one|two]

Hires prompting

Modify hires prompt directly from main prompt with {lowres prompt:hires prompt}

This enables the use of different LORAs in lowres and hires conveniently.

Hires prompting can also be nested with most prompting syntax.

This allows incrementally changing prompt for hires without using the hires prompt box (no need to copy paste entire prompt just to change something in hires)

I recommend adding Hires prompt and Hires negative prompt to disregarded fields from pasted info text in settings -> user interface -> infotext.

Remove line breaks and extra whitespace

Removes unnecessary whitespace like duplicate spaces, and replaces line breaks with commas. (Does not create duplicate commas if there is already a comma before or after a line break)

Examples

Styles

cinematic
pos: cinematic perspective, letterboxing
neg: colorful, cute

artistic
pos: van gogh, {prompt}, abstract artstyle, {prompt}, landscape
neg: blurry, ugly

Basic use

oil painting, $cinematic, man standing in rain
->
oil painting, cinematic perspective, letterboxing, man standing in rain

{prompt} parts are removed automatically

playground, $artistic
->
playground, van gogh, abstract artstyle, landscape

Mixing parts and using negative

pos: $3artistic, man, $1(artistic)
neg: 3D, $cinematic
->
pos: landscape, man, van gogh
neg: 3D, colorful, cute

Create more 3D-like anime images

Create a 3d base image, then use flat anime styling in hires

pos: cute girl, {realistic, 3d:anime style, flat digital art}
neg: worst quality, abstract, {:3d, realistic}
->
pos: cute girl, realistic, 3d
neg: worst quality, abstract,
hires pos: cute girl, anime style, flat digital art
hires neg: worst quality, abstract, 3d, realistic

extension-style-vars's People

Contributors

sirveggie avatar

Stargazers

Terry avatar  avatar  avatar leanAI avatar mkgiga avatar  avatar Juan Sebastian Giraldo avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar Kapital avatar John D. Pope avatar V--R avatar Patrick Boelens (bluetomato) avatar I.N.K.Y avatar

Watchers

Armando avatar  avatar

Forkers

johndpope

extension-style-vars's Issues

When doing a batch, randomization syntax does not work.

When I choose to do a batch(not the multiple in one) with the syntax {one|two|three} and it makes multiple images, it does not randomize, I have to have it run non-stop image by image.

Is their any way you can fix it? or is it an easy fix that maybe I can pull off (barely no coding experience).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.