Skip to content

SyDNEy v1.2.0

Latest

Choose a tag to compare

@pfeaster pfeaster released this 09 Nov 14:28
· 17 commits to main since this release

This release introduces a number of changes introduced between mid-April and November 2024.

  1. #stagger
    For a series of jobs set up to generate images of the same height, the #stagger coordinator will concatenate the latents horizontally and, after each inference step, will shift the whole leftward by a specified number of columns so that the settings for each job will be applied to a different segment of the latent. The columns of the concatenated latent are then shifted back to their initial positions at the end of the whole process, and a single result for the whole group is output as an image and .pt file. If $outskip (no argument needed) is specified, only the .pt file will be generated; the decoding, onscreen display, and saving of the image file will be blocked. If $shiftback 0 is specified, the concatenated latent will NOT be returned to its starting point after processing; otherwise it will ($shiftback 1).
    A group of jobs to be handled in this way is preceded by #stagger, the number of columns to shift leftward per step, and a colon, e.g.
    #stagger 5:
    The end of the group of jobs needs to be marked by the coordinator #unstagger.
    The $name, $dir, $outskip, and/or $shiftback settings of the FIRST job in the group will be applied to the cumulative output. (This seems occasionally to fail; to be really safe, place in #set instead.)
    All jobs in a #stagger group must have the same number of steps and must be of the same height (though width can vary), or an error will result. This coordinator was introduced primarily to support smoother long-form audio generation (though it can have other uses too). For larger concatenations intended to yield audio, it's a good idea to include $outskip.
    Special case -- #stagger 0: will simply concatenate latents horizontally to produce a combined output, but the image decoded from the latent will tend to have smoother or subtler horizontal boundaries between segments than concatenating separately generated images would.
    ADVANCED MODES:
    Specifying two variables (e.g., #stagger 5;6:) will shift the latent horizontally (by the first amount) and vertically (by the second amount). Note that this is the reverse order from the syntax for #shift and #nshift!
    Specifying three variables (e.g., #stagger 5;6;3) will arrange component images into the number of vertically stacked rows specified by the third number. In this mode, all images must be the same height and width.
    Specifying multiple values separated by commas will apply them in successive steps. This, #stagger 5,-5 will shift 5 horizontally to the left on the first step and then 5 horizontally back to the right on the next step, and continue this pattern for as many steps as there re. #stagger 5,-5;5,-5 will do the same thing but in both the horizontal and vertical dimensions.

  2. #comb
    The #comb coordinator may be used to cycle through all combinations of the elements of a set. Arguments are group size, punctuator (demarcated by / slashes), and elements. Thus:
    #comb $xa 2 /+/a;b;c:
    would generate the combinations
    a+b
    a+c
    b+c
    and
    #comb $xa 2 / and /cat;dog;fish:
    would generate the combinations
    cat and dog
    cat and fish
    dog and fish
    If no punctuator is supplied (e.g., #comb $xa 3 a;b;c;d;e:), the combinations will be assigned to separate settings named by adding ascending numerical suffixes to the specified setting name (e.g., $xa1, $xa2, $xa3).
    The value ~~ in a set element will cause it to be factored in twice, once with ~~ removed, once with it replaced by "-", but these values will not be paired with each other. This allows positive and negative values to be included in a list without being redundantly combined and canceling each other out. Thus:
    #comb $xa 2 /+/~~1,~~2:
    would generate the combinations
    1+2
    1+-2
    -1+2
    -1+-2
    But not:
    1+-1
    2+-2

  3. $txtmod
    Allows a text encoder from a given model to be designated that differs from the model used for the UNet, but using the same model index numbers. Thus:
    $model 4 $txtmod 7
    would use model 4 for the UNet but model 7 for the text encoder.

  4. Removed csv log generation (I found I wasn't using it, and it was no longer recording all relevant variables anyway)

  5. $& = This is like $* but modifies the values of the token immediately following an ampersand (&) in the text prompt rather than inserting an extra row that otherwise consists of zeroes.
    Arguments are the same as $* except for a fourth argument following them:
    0 = add
    1 = multiply

  6. For $* and $& added third value option -1:
    With $* applies adjustment to ALL asterisks.
    With $& applies adjustment to all prompt tokens (but not start/end/padding).

  7. For $* or $&
    If column value is -1, adjustment is applied to ALL columns.

  8. #scrape=pt or scrape=tif or whatever will limit the scrape to the specified file extension, while #scrapedir will scrape the directories within a specified directory.

  9. $namestrip will strip the directory location, timestamp, and file extension from a #scrape variable so that it can be used for naming an output file; with this option, use $postname to add text after each copied output name rather than a construct such as "$xs_reprocessed" because in that other case the suffix ("_reprocessed") will likewise end up stripped. Example:

#scrape $xs foldername:
#copy $xs $seed 1234 $name $xs $namestrip $postname _1234
#end $xs

  1. Advisory: with model 14, use $vae 2 (or basically any other VAE) to avoid burn.

  2. Added $clipskip, $neg_clipskip, $2clipskip, $2neg_clipskip (can also be used in contrastives). With SDXL, a negative clip skip (-1) can be used to access the last hidden layer (these models use the penultimate layer by default).

  3. Also $cliprange, $neg_cliprange, $2cliprange, $2neg_cliprange - three arguments, a,b,c -- takes hidden layers a through b from the end and does option c with them, where 0 = mean, 1 = sum, 2 = median. NOTE: 0 and 1 by themselves introduce no difference (multiplying an embedding by a positive number doesn't change the result).

  4. $padfrom = replaces the padding rows in the main prompt embedding with the equivalent numbered rows from an embedding generated in the same way but from a different, specified prompt.

  5. Adjusted to allow for negative values in #shift and #nshift -- these will shift the latent to the right or downward (rather than to the left or upward as with a positive value).

  6. $skipstep - At the whole-job level, will skip the number of inference steps specified, starting from the last one. With 20 steps specified, $skipstep 1 will stop processing after 19 steps.

  7. #each - Will assign a value from a list to a variable each time it occurs within a specified piece of script (with the list looping back around to the beginning as needed to fill out the number of occurrences). Generic example:

#each $xe a;b;c: #incr $xn 10: $xn$xe #end $xn #end $xe
OUTPUT:
1a 2b 3c 4a 5b 6c 7a 8b 9c 10a

Useful for varying a parameter in conjunction with some other cycle, such as #scrape, #incr, or #for.

Note that placing an #each loop INSIDE another loop will cause it to run separately the contents of each iteration of that loop, i.e., it won't alternate among its options ACROSS iterations of that loop.

#incr $xn 10: #each $xe a;b;c: $xn$xe #end $xe #end $xn
OUTPUT:
1a 2a 3a 4a 5a 6a 7a 8a 9a 10a
(because each loop starts over with the first #each option, 'a')

  1. If $i2i strength value is set to 1, it's changed internally to 0.99999 to avoid throwing an error. This value effectively either re-decodes the latent from a source .pt (perhaps using a different vae than originally) or encodes and then re-decodes a source image (which can illustrate whatever effect this has).

  2. If a third argument, 1, is added to $i2i, no random noise will be added to the source image.

  3. $chop = takes an input image and "chops" it into pieces organized as an x-by-y grid that can then be fed into SyDNEy in i2i mode. Takes five arguments: (1) the source image name (assumed to be in the main or work directory); an output directory for saving the results; the number of vertical divisions; the number of horizontal divisions; and the vertical height of each piece (the source image will be resized accordingly). This can use a source image as the basis for a piece of music:

#new $chop source;source_working;5;3;512 #restart
#stagger 5: #scrape $xs source_working:
#new i2i $xs;0.1 $model 1 $prompt disco funk with a crazy beat $dir source_result $outskip
#end $xs #unstagger
#new $wavcat source_result

Or it can be used in conjunction with stagger to enlarge a source image.

#new $chop source;source_working;3;3;512 #restart
#stagger 5;5;3: #scrape $xs source_working:
#new i2i $xs;0.5 $model 25 $prompt picture of a cat $name source_result
#end $xs #unstagger

  1. $rgb will submit a source image in i2i-like mode made up of a single RGB-defined color. Arguments are separated by commas; first three are R, G, B values; fourth is strength. Fifth is optional, but if 1, no initial noise will be added to the source. "Color Picker" GUI button allows user to select a color and get its RGB values for convenience.

  2. More measures to free up memory during Wavcat processing; also a provision for processing and saving results in multiple evenly-sized pieces if there's not enough memory to handle the whole at once.

  3. $clipmore = adds a quantity of additional layers by running the output of the text encoder back through the encoder again as many times as needed. First argument is the number of layers. Second, optional after a comma: if "1," applies final layer norm after each complete iteration, otherwise doesn't, and waits until end.

  4. $npart: a negative value is now interpreted as a FRACTION of the latent height or width. 0 is interpreted simultaneously as a row/column number and as a fraction of the total (since these are equivalent).

  5. #resume = Specifies a cumulative job number at which a script will resume processing. Ignored if a resume point is otherwise specified.

  6. Added a mechanism for saving a separate resume point for each script, so that a script can be resumed at any future time from where it left off previously. If a resume point wasn't saved, this is reported when the backup is loaded.

Known bugs and incompatibilities:
Scheduler 12 shouldn't be used with #stagger, and it works erratically in $i2i and $rgb modes.
A #stagger shouldn't be placed inside a #set containing a $contrast.
#copy will not handle $contrast correctly.