-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' of github.com:lstein/stable-diffusion into…
… development
- Loading branch information
Showing
26 changed files
with
926 additions
and
1,014 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,4 +134,4 @@ | |
|
||
## Links | ||
|
||
- **[Read Me](readme.md)** | ||
- **[Read Me](../readme.md)** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Contributors | ||
|
||
The list of all the amazing people who have contributed to the various features that you get to experience in this fork. | ||
|
||
We thank them for all of their time and hard work. | ||
|
||
_Original Author:_ | ||
|
||
- Lincoln D. Stein <lincoln.stein@gmail.com> | ||
|
||
_Contributions by:_ | ||
|
||
- [Sean McLellan](https://github.com/Oceanswave) | ||
- [Kevin Gibbons](https://github.com/bakkot) | ||
- [Tesseract Cat](https://github.com/TesseractCat) | ||
- [blessedcoolant](https://github.com/blessedcoolant) | ||
- [David Ford](https://github.com/david-ford) | ||
- [yunsaki](https://github.com/yunsaki) | ||
- [James Reynolds](https://github.com/magnusviri) | ||
- [David Wager](https://github.com/maddavid123) | ||
- [Jason Toffaletti](https://github.com/toffaletti) | ||
- [tildebyte](https://github.com/tildebyte) | ||
- [Cragin Godley](https://github.com/cgodley) | ||
- [BlueAmulet](https://github.com/BlueAmulet) | ||
- [Benjamin Warner](https://github.com/warner-benjamin) | ||
- [Cora Johnson-Roberson](https://github.com/corajr) | ||
- [veprogames](https://github.com/veprogames) | ||
- [JigenD](https://github.com/JigenD) | ||
- [Niek van der Maas](https://github.com/Niek) | ||
- [Henry van Megen](https://github.com/hvanmegen) | ||
- [Håvard Gulldahl](https://github.com/havardgulldahl) | ||
- [greentext2](https://github.com/greentext2) | ||
- [Simon Vans-Colina](https://github.com/simonvc) | ||
- [Gabriel Rotbart](https://github.com/gabrielrotbart) | ||
- [Eric Khun](https://github.com/erickhun) | ||
- [Brent Ozar](https://github.com/BrentOzar) | ||
- [nderscore](https://github.com/nderscore) | ||
- [Mikhail Tishin](https://github.com/tishin) | ||
- [Tom Elovi Spruce](https://github.com/ilovecomputers) | ||
- [spezialspezial](https://github.com/spezialspezial) | ||
- [Yosuke Shinya](https://github.com/shinya7y) | ||
- [Andy Pilate](https://github.com/Cubox) | ||
- [Muhammad Usama](https://github.com/SMUsamaShah) | ||
- [Arturo Mendivil](https://github.com/artmen1516) | ||
- [Paul Sajna](https://github.com/sajattack) | ||
- [Samuel Husso](https://github.com/shusso) | ||
- [nicolai256](https://github.com/nicolai256) | ||
|
||
_Original CompVis Authors:_ | ||
|
||
- [Robin Rombach](https://github.com/rromb) | ||
- [Patrick von Platen](https://github.com/patrickvonplaten) | ||
- [ablattmann](https://github.com/ablattmann) | ||
- [Patrick Esser](https://github.com/pesser) | ||
- [owenvincent](https://github.com/owenvincent) | ||
- [apolinario](https://github.com/apolinario) | ||
- [Charles Packer](https://github.com/cpacker) | ||
|
||
--- | ||
|
||
_If you have contributed and don't see your name on the list of contributors, please let one of the collaborators know about the omission, or feel free to make a pull request._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# **Interactive Command-Line Interface** | ||
|
||
The `dream.py` script, located in `scripts/dream.py`, provides an interactive interface to image generation similar to the "dream mothership" bot that Stable AI provided on its Discord server. | ||
|
||
Unlike the txt2img.py and img2img.py scripts provided in the original CompViz/stable-diffusion source code repository, the time-consuming initialization of the AI model initialization only happens once. After that image generation | ||
from the command-line interface is very fast. | ||
|
||
The script uses the readline library to allow for in-line editing, command history (up and down arrows), autocompletion, and more. To help keep track of which prompts generated which images, the script writes a log file of image names and prompts to the selected output directory. | ||
|
||
In addition, as of version 1.02, it also writes the prompt into the PNG file's metadata where it can be retrieved using scripts/images2prompt.py | ||
|
||
The script is confirmed to work on Linux, Windows and Mac systems. | ||
|
||
_Note:_ This script runs from the command-line or can be used as a Web application. The Web GUI is currently rudimentary, but a much better replacement is on its way. | ||
|
||
``` | ||
(ldm) ~/stable-diffusion$ python3 ./scripts/dream.py | ||
* Initializing, be patient... | ||
Loading model from models/ldm/text2img-large/model.ckpt | ||
(...more initialization messages...) | ||
* Initialization done! Awaiting your command... | ||
dream> ashley judd riding a camel -n2 -s150 | ||
Outputs: | ||
outputs/img-samples/00009.png: "ashley judd riding a camel" -n2 -s150 -S 416354203 | ||
outputs/img-samples/00010.png: "ashley judd riding a camel" -n2 -s150 -S 1362479620 | ||
dream> "there's a fly in my soup" -n6 -g | ||
outputs/img-samples/00011.png: "there's a fly in my soup" -n6 -g -S 2685670268 | ||
seeds for individual rows: [2685670268, 1216708065, 2335773498, 822223658, 714542046, 3395302430] | ||
dream> q | ||
# this shows how to retrieve the prompt stored in the saved image's metadata | ||
(ldm) ~/stable-diffusion$ python ./scripts/images2prompt.py outputs/img_samples/*.png | ||
00009.png: "ashley judd riding a camel" -s150 -S 416354203 | ||
00010.png: "ashley judd riding a camel" -s150 -S 1362479620 | ||
00011.png: "there's a fly in my soup" -n6 -g -S 2685670268 | ||
``` | ||
|
||
<p align='center'> | ||
<img src="../assets/dream-py-demo.png"/> | ||
</p> | ||
|
||
The `dream>` prompt's arguments are pretty much identical to those used in the Discord bot, except you don't need to type "!dream" (it doesn't | ||
hurt if you do). A significant change is that creation of individual images is now the default unless --grid (-g) is given. | ||
|
||
For backward compatibility, the -i switch is recognized. For command-line help type -h (or --help) at the dream> prompt. | ||
|
||
The script itself also recognizes a series of command-line switches that will change important global defaults, such as the directory for | ||
image outputs and the location of the model weight files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# **Image-to-Image** | ||
|
||
This script also provides an img2img feature that lets you seed your creations with an initial drawing or photo. This is a really cool feature that tells stable diffusion to build the prompt on top of the image you provide, preserving the original's basic shape and layout. To use it, provide the `--init_img` option as shown here: | ||
|
||
``` | ||
dream> "waterfall and rainbow" --init_img=./init-images/crude_drawing.png --strength=0.5 -s100 -n4 | ||
``` | ||
|
||
The `--init_img (-I)` option gives the path to the seed picture. `--strength (-f)` controls how much the original will be modified, ranging from `0.0` (keep the original intact), to `1.0` (ignore | ||
the original completely). The default is `0.75`, and ranges from `0.25-0.75` give interesting results. | ||
|
||
You may also pass a `-v<count>` option to generate count variants on the original image. This is done by passing the first generated image back into img2img the requested number of times. It generates interesting variants. | ||
|
||
If the initial image contains transparent regions, then Stable Diffusion will only draw within the transparent regions, a process | ||
called "inpainting". However, for this to work correctly, the color information underneath the transparent needs to be preserved, not erased. See [Creating Transparent Images For Inpainting](./INPAINTING.md#creating-transparent-regions-for-inpainting) for details. |
Oops, something went wrong.