Commit Graph

254 Commits

Author SHA1 Message Date
hlky
0050d54a1a default=false 2022-10-02 21:20:46 +01:00
xaedes
a88cf2a22c
Add metadata to scn2img intermediate image output (#1386)
# Description

Intermediate image saving in scn2img tries to save metadata which is not
set. This results in warning thrown in console: "Couldn't find metadata
on image", originally reported by @codedealer in
https://github.com/sd-webui/stable-diffusion-webui/pull/1179#pullrequestreview-1120015859

Metadata for intermediate images is added to fix the warning.

Following metadata is written:
- "prompt" contains the representation of the SceneObject corresponding
to the intermediate image
- "seed" contains the seed at the start of the function that generated
this intermediate image
- "width" and "height" contain the size of the image.

To get the seed at the start of the render function without using it, a
class SeedGenerator is added and used instead of the python generator
functions.

Fixes warning thrown in console: "> Couldn't find metadata on image",
originally reported by @codedealer in
https://github.com/sd-webui/stable-diffusion-webui/pull/1179#pullrequestreview-1120015859

# Checklist:

- [x] I have changed the base branch to `dev`
- [x] I have performed a self-review of my own code
- [x] I have commented my code in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
2022-10-02 20:56:49 +01:00
Divided by Zer0
bb8850b9dd
Allows passing args to webui.sh and webui.cmd (#1385)
This change helps with starting the stable horde bridge, without having
to change the relauncher.py every time. It also allows one to start
multiple bridges (for multiple GPUs) by passing the `-n` argument to the
.cmd/.sh
2022-10-02 19:24:23 +01:00
Alejandro Gil
fdf600b49a
Merge branch 'sd-webui:dev' into dev 2022-10-02 11:00:24 -07:00
ZeroCool940711
e950720f9e Updated the model manager with the new locations and models links. 2022-10-02 10:59:20 -07:00
xaedes
33b896d0cb
Scene-to-Image Prompt Layering System (#1179)
# Summary of the change

- new Scene-to-Image tab
- new scn2img function
- functions for loading and running monocular_depth_estimation with
tensorflow

# Description

(relevant motivation, which issue is fixed)

Related to discussion #925

> Would it be possible to have a layers system where we could do have
foreground, mid, and background objects which relate to one another and
share the style? So we could say generate a landscape, one another layer
generate a castle, and on another layer generate a crowd of people.

To make this work I made a prompt-based layering system in a new
"Scene-to-Image" tab.
You write a a multi-line prompt that looks like markdown, where each
section declares one layer.
It is hierarchical, so each layer can have their own child layers.

Examples: https://imgur.com/a/eUxd5qn
![](https://i.imgur.com/L61w00Q.png)

In the frontend you can find a brief documentation for the syntax,
examples and reference for the various arguments.

Here a short summary:

Sections with "prompt" and child layers are img2img, without child
layers they are txt2img.
Without "prompt" they are just images, useful for mask selection, image
composition, etc.
Images can be initialized with "color", resized with "resize" and their
position specified with "pos".
Rotation and rotation center are "rotation" and "center". 

Mask can automatically be selected by color or by estimated depth based
on https://huggingface.co/spaces/atsantiago/Monocular_Depth_Filter.

![](https://i.imgur.com/8rMHWmZ.png)

# Additional dependencies that are required for this change

For mask selection by monocular depth estimation tensorflow is required
and the model must be cloned to ./src/monocular_depth_estimation/
Changes in environment.yaml:
- einops>=0.3.0
- tensorflow>=2.10.0 

Einops must be allowed to be newer for tensorflow to work.

# Checklist:

- [x] I have changed the base branch to `dev`
- [x] I have performed a self-review of my own code
- [x] I have commented my code in hard-to-understand areas
- [x] I have made corresponding changes to the documentation

Co-authored-by: hlky <106811348+hlky@users.noreply.github.com>
2022-10-02 18:23:37 +01:00
Divided by Zer0
5853f3e1a1
Stable Horde bridge (#1204)
# Adds the bridge code which when enabled turns the webui into a
headless [Stable Horde](https://stablehorde.net) instance

It adds a few new command-line args to be able to pass variables to the
bridge, as well as the possibility to set it via a variables files
`bridgeData.py`.

To start the bridge, one needs to add the `--bridge` argument to their
relauncher.py as well as any horde vars they want to specify.

On top of that this adds the loguru module as well as my tuned loguru
config. This provides a much nicer logging output and provides the
capability to save output to files for issue reports etc. For now only
the bridge is utilizing the nice format, but once it's merged, you can
start replacing `print()` with `logger.xxx()` where appropriate

To make the bridge work, I've had to add defaults to txt2img but this
should not affect anything.


# Checklist:

- [ x ] I have changed the base branch to `dev`
- [ x ] I have performed a self-review of my own code
- [ x ] I have commented my code in hard-to-understand areas
- [ x ] I have made corresponding changes to the documentation

Co-authored-by: hlky <106811348+hlky@users.noreply.github.com>
Co-authored-by: Thomas Mello <work.mello@gmail.com>
Co-authored-by: Joshua Kimsey <jkimsey95@gmail.com>
Co-authored-by: ZeroCool <ZeroCool940711@users.noreply.github.com>
2022-10-02 18:22:27 +01:00
ZeroCool940711
4e0511dbac Changed the default output folder to be shorter. 2022-10-02 09:46:30 -07:00
ZeroCool940711
91957dab34 Fixed GFPGAN upscaling at the end of the generation as well as doing the face restoratin.
- Added default values to some functions arguments to make them optional.
2022-10-02 07:54:56 -07:00
ZeroCool940711
02432b4b39 Improved the Settings page layout and code structure. 2022-10-02 06:59:29 -07:00
Joshua Kimsey
61f0281dac
Merge branch 'dev' into expand-settings-page 2022-10-02 04:25:11 -04:00
Joshua Kimsey
802355b683 Finished Adding Settings Components
Repetitive Actions Are Repetitive
2022-10-02 04:24:50 -04:00
ZeroCool940711
0c03cedeb9 Added LDSR to the UI. 2022-10-01 20:18:09 -07:00
ZeroCool940711
bbedcc8e84 Merge remote-tracking branch 'origin/dev' into dev 2022-10-01 19:19:04 -07:00
Joshua Kimsey
fc12f124c9
Merge branch 'dev' into expand-settings-page 2022-10-01 21:20:56 -04:00
ZeroCool940711
3756c1d74c Added option on the UI to select a model for GFPGAN in case we have more than one version on its folder. 2022-10-01 17:43:36 -07:00
hlky
a3f94d3491
Update txt2vid.py 2022-10-02 00:52:53 +01:00
hlky
babf6c4fc0
Update txt2vid.py 2022-10-02 00:46:51 +01:00
hlky
4b6de58ae4
Update txt2vid.py 2022-10-02 00:27:58 +01:00
hlky
47e340dc2c
Update txt2vid.py 2022-10-01 23:59:50 +01:00
ZeroCool940711
0307e9831a Added WIP code for img2txt to get information dynamically from artstation. 2022-10-01 15:39:12 -07:00
hlky
2a49c28980
docker / local cache paths 2022-10-01 22:50:40 +01:00
hlky
a5c941329e
Update img2txt.py 2022-10-01 21:47:26 +01:00
Joshua Kimsey
4670e6f2de Merge branch 'dev' into expand-settings-page 2022-10-01 16:35:21 -04:00
ZeroCool940711
541c354f8b Merge remote-tracking branch 'origin/dev' into dev
# Conflicts:
#	scripts/txt2img.py
2022-10-01 11:58:20 -07:00
ZeroCool940711
0f36186236 Added drop down menu to select from the available GFPGAN models we have installed. 2022-10-01 11:52:31 -07:00
Qualzz20m
65a89c4aeb gallery_v1 2022-10-01 20:14:32 +02:00
Joshua Kimsey
777d724598 Fixed doubled up code 2022-10-01 07:41:40 -04:00
Joshua Kimsey
e2b1dcf0bd Fixed separate_prompts error 2022-10-01 04:43:53 -04:00
Joshua Kimsey
2cfbb5f63e Add Txt2Img Settings
Added the Txt2Img settings from the `configs/webui/webui_streamlit.yaml` file. All are working except `separate_prompts`, which throws a `Missing key separate_prompts` error for some reason.
2022-10-01 04:30:25 -04:00
ZeroCool940711
857608c5f6 ... 2022-09-30 15:46:02 -07:00
ZeroCool940711
20a89a1233 Add more print statements to provide more info on whats happening behind the scenes. 2022-09-30 13:04:08 -07:00
ZeroCool940711
d8a8687852 Improved img2txt layout and performance. 2022-09-30 12:41:01 -07:00
ZeroCool940711
3bb432162e Added open clip dependency which is needed for some CLIP models. 2022-09-30 08:47:30 -07:00
hlky
084fa9732f
Update img2txt.py 2022-09-30 10:40:02 +01:00
ZeroCool940711
51b7c9ac31 Removed some left over comments on webui_streamlit.py 2022-09-30 02:05:16 -07:00
ZeroCool940711
8673363d71 Moved the css loading to be on sd_utils.py 2022-09-30 02:04:52 -07:00
ZeroCool940711
50bc2bb545 Fixed typo on the model manager 2022-09-30 02:04:32 -07:00
ZeroCool940711
5445287bcf Img2txt working now but needs more than 8GB og VRAM to work. Will be trying to improve it as the next step. 2022-09-29 08:52:46 -07:00
ZeroCool940711
466cfde3fa More fixes for img2txt 2022-09-29 07:27:56 -07:00
ZeroCool940711
625ba555e3 Fixed custom models not loading on txt2img, img2img and txt2vid. 2022-09-29 03:29:44 -07:00
ZeroCool940711
ae263cb55e Made sure the txt2vid tab shows a loading animation when the models are loading. 2022-09-29 01:07:32 -07:00
ZeroCool940711
07d935b445 More fixes to img2txt 2022-09-29 01:07:32 -07:00
Alejandro Gil
f678efb4e2
Img2txt dependencies and necessary files. (#1354) 2022-09-28 12:37:15 -07:00
Alejandro Gil
510d103a83
Temporary fix for the jumpy UI and tabs resetting to the first one. (#1353) 2022-09-28 10:02:08 -07:00
Alejandro Gil
3e40bab7f7
Changed the default streamlit import for hydralit as we will be using hydralit as replacement for the default streamlit library, hydralit provides better control over css as well as having a lot more options. (#1352) 2022-09-28 09:33:54 -07:00
Alejandro Gil
1f4b564de4
Removed the models in case of OOM so we can reload them. (#1343) 2022-09-27 11:51:17 -07:00
Alejandro Gil
519d7c661f
Added new implementation of the textual inversion page. (#1342) 2022-09-27 11:36:48 -07:00
ZeroCool
8f2ed2f350
Added message on the text to video tab for specifying how to add the huggingface token if its missing. (#1339)
# Checklist:

- [x] I have changed the base branch to `dev`
- [x] I have performed a self-review of my own code
- [x] I have commented my code in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
2022-09-27 00:57:28 -07:00
Lizardy
62790406bf
Fix --config args
* Fixed config args being double-loaded and not replacing the defaults.
2022-09-26 23:58:41 -04:00