if write to Gscale input=> "{10-20}"

and

imageOptions
  guidanceScale = [input.Gscale]
  saveDescription = Guidance Scale is [input.Gscale]
  
  // or
  saveDescription = Guidance Scale is [settings.imageOptions.guidanceScale] 
  

it will assign a random Guidance Scale to the image every time, but in its saveDescription, it will write a different random number instead of the used before.

Is there any way to get the value of the guidanceScale of this image?

you are viewing a single comment's thread
view the rest of the comments
[–] [S] 1 point 8 months ago (2 children)

Thank you very much for the function, it can really be useful for many tasks!

But unfortunately, in this particular situation, it doesn't work quite as expected. Without beforeGenerate(), guidanceScale currently gives for each image a random value that you specified (for example, {10-20}).

However, beforeGenerate() takes a single value from this range and assigns it to all images

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 7 months ago (1 child)

    Ah good point! Sorry for the delay here, I've just added the ability to write imageOptions as a function - so you should now be able to just replace your original imageOptions with something like this:

    imageOptions() =>
      gs = input.Gscale.evaluateItem;
      return {
        guidanceScale: gs,
        saveDescription: `Guidance Scale is ${gs}`,
        // ... etc.
      };
    
  • source
  • parent
  • hideshow 1 child comment