invoke-ai / InvokeAI

Invoke is a leading creative engine for Stable Diffusion models, empowering professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry leading WebUI, and serves as the foundation for multiple commercial products.
https://invoke-ai.github.io/InvokeAI/
Apache License 2.0
23.68k stars 2.43k forks source link

Alternate way of reading prompts from an external file #142

Closed Lumoria closed 2 years ago

Lumoria commented 2 years ago

Could an alternate version of the external prompt input be made? On progrockdiffusion (discodiffusion) I had an external file that had a list of prompts, artists, ect all on different lines that I would comment on / off to append to a single prompt once run. I personally find it way easier and faster to manage prompts this way and it would be awesome if this could be incorporated here! Also could reading from an external prompt be changed so that we don't have to initialize and reload the model every time we want to run?

Example of prompt file:

        "by Ivan Aivazovsky:2", //landscapes, ocean, ships
        //"by M.C. Escher:2",
        //"by Karol Bak:2", //feminine portraits
        //"by John Berkey:2", //sci fi ships
        //"by Zdzisław Beksiński:2", //dark dire dread
        //"by AlbertBierstadt:3", //landscapes
        //"by Johfra Bosschart:6", //landscapes, fungi, jagged

        "trending on ArtStation:3",

        //"bicycle:20",
        //"alchemy shop interior:6",
        //"ball on table:6",
        //"fantasy castle in a large field:4",
        "pastel | pretty:6",
        "forest:2",
        "river flowing through a doorway:4",
        "shrine:6",
        //"vast distant:3",
        //"stone bridge in the foreground and mountains in the background:2",
        //"river flowing down the center of a field with a castle in the distance:2",
        //"crystal coral reef:3",
        //"crystals:3",
        //"tombstones:4",
        //"a cottage in the distance:4",
        //"frozen:3",
        //"clouds:4",
        //"moon:2",
        //"mountains in the distance:4",
        //"tree roots:2",
        //"lantern:8",
        //"sacred:2",
        //"staircase:2",
        //"watercolor:2",
        //"cyberpunk:6",
        //"diorama:8",
        "godrays through the trees:6",

        "text:-30.1",
lstein commented 2 years ago

Could you point me at the documentation for this format? I think I followed it all the way to the last line, and then flipped out on "text: -30.1".

Lumoria commented 2 years ago

Could you point me at the documentation for this format? I think I followed it all the way to the last line, and then flipped out on "text: -30.1".

Here's the diffusion repo this prompt was used in.

Discodiffusion prompt weights worked pretty different than they currently do in SD (I have another issue opened about that). But the text:-30.1 was used to try to decrease the likelihood of artist signatures appearing in pictures. I used a float only on the text tag to make sure the weight sum never added up to 0 which would cause issues.

I cant really be more specific for the documentation because I'm not a coder, sorry lol.