Git Product home page Git Product logo

Comments (9)

lstein avatar lstein commented on May 14, 2024 2

I've fixed the closing quote problem (and similar problems parsing the prompt). Use ' to get a quote mark.

With respect to overwriting files, I've observed this as well. I will replace the original filenaming algorithm with something that never overwrites a file. Does anyone mind if I replace the 00042.png filenames with a timestamp, such as 22Aug22-14:10:11.png

from invokeai.

lstein avatar lstein commented on May 14, 2024 1

I'm going to stick with the simple numbers and just add a few leading zeroes for the time being. The problem with the original code is that it counted the number of files in the current directory and named the next file 1+the count. However, if some of the files had been deleted, the count would be wrong and files would get overwritten because the code didn't check whether it clobbered a file. For revisions, I'll append a dot and an additional 3 digits (nobody's gonna do an img2img 999 times, are they?).

In the future one could specify a printf string on the command line to format filenames according to your preference, e.g.

--filename_format="%Y-%d-%p-%S.png"

The various % formats would be replaced with something like p="text of prompt", S=seed, %Y=year, etc.

from invokeai.

thezveroboy avatar thezveroboy commented on May 14, 2024

this is for all forks. it's a problem of original code

from invokeai.

morganavr avatar morganavr commented on May 14, 2024

Problem appears when trying to regenerate an image with the same seed.
Original image was generated with filename 00008.png
Then, if you run the prompt below (this prompt is slightly different from original) - script overwrites 00008.png file with new image and reports that new image has exactly the same seed. This behavior makes experiments (attempt to create variations of image by tweaking its parameters) more difficult compared to SD discord bot that generated new seed for each newly generated image and the most frustrating part is that original image is overwritten.

Example of prompt that causes the problem:

dream> "photo of an elephant reading a book" -s150 -b1 -W512 -H512 -C8.5 -I./init-images/5.png -f0.5 -S1108544598

from invokeai.

morganavr avatar morganavr commented on May 14, 2024

What about adding seed number at the end of each image name? Every generated image should have unique seed.
Like 0000000001_S1108544598.png

Also, I propose to increase number of decimals in filename from 5 decimals to at least 10 because people will generate tons of images.

from invokeai.

lstein avatar lstein commented on May 14, 2024

This could work. I'd also like to number img2img mods so that the basename of the original file is reused, so something like 0005-revision1.png

from invokeai.

morganavr avatar morganavr commented on May 14, 2024

I like idea with revisions! For correct file sorting I propose to increase number of digits to at least 3: revision001.png

Does anyone mind if I replace the 00042.png filenames with a timestamp, such as 22Aug22-14:10:11.png

If you decide to use timestamp, I propose to use UNIX format because filenames could be correctly sorted in File Explorer.

Example of UNIX timestamp: 1661213008

From psychological point of view I would stick with simpler numbers like 00020.png, 00021.png
Then people could easily remember that their favorite image is in files "55" and "73". If you go with UNIX timestamp - their two favorite images will be in 1661213138 and 1661214235 and nobody could remember it :)

from invokeai.

1blackbar avatar 1blackbar commented on May 14, 2024

is half precision used as default? i think its the full one from what i see in the dream file

from invokeai.

lstein avatar lstein commented on May 14, 2024
  • Filenames now use the following formats:
       000010.95183149.png      -- Two files produced by the same command (e.g. -n2),
       000010.26742632.png      -- distinguished by a different seed.

       000011.455191342.01.png  -- Two files produced by the same command using
       000011.455191342.02.png  -- a batch size>1 (e.g. -b2). They have the same seed.

       000011.4160627868.grid#1-4.png  -- a grid of four images (-g); the whole grid can
                                          be regenerated with the indicated key

Yes, half precision is the default. The arg parser's syntax is a little weird.

from invokeai.

Related Issues (20)

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.