# 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>
# 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>
Changed realesrgan dependency to use pip instead of having to clone the
repository on the src folder, this should reduce the amount of stuff
that is on the src folder and that causes issues when updating.
# Checklist:
- [x ] I have changed the base branch to `dev`
- [ x] I have performed a self-review of my own code
* #715#699#698#663#625#617#611#604 (#716)
* Update README.md
* Add sampler name to metadata (#695)
Co-authored-by: EliEron <example@example.com>
* old-dev-merge
Co-authored-by: EliEron <subanimehd@gmail.com>
Co-authored-by: EliEron <example@example.com>
* img2img-fix (#717)
* Revert "img2img-fix (#717)"
This reverts commit 70d4b1ca2a.
* img2img fixes
* Revert "img2img fixes"
This reverts commit e66eddc621.
* Revert "Revert "img2img-fix (#717)""
This reverts commit bf08b617d4.
* img2img fixed
* - Removed duplicated calls to save_sample.
- Change variables and arguments to be more self-explanatory and easier to understand what they do.
* Moved streamlit files to their proper location, before they were incorrectly added to the repository root folder.
* Added retry dependency for the streamlit version.
* Added .cmd file for easy running and updating the streamlit version of the UI.
* Removed duplicated entry for streamlit on the environment.yaml file.
* Removed some unnecessary lines from the the webui_streamlit.cmd file.
* add gfpgan folder to gitignore, auto gen by imglab
* added placeholder text similar to gradio
* added auto conversion for 4 channel PNG to RGB
* fix: regex escape characters
* Update Readme links to sd-webui when appropriate (#781)
* Update link to sd-webui when appropriate
* added LDSR instruction per devilismyfriend guide
* fix: stack overflow during recursion call (#784)
* Added option to set default sampler name from config file, will be useful for those wanting to change the default sampler and have it persist even when closing the UI and opening it again.
* Added try and except block to handle basic errors like StopException which is raised by streamlit when you hit the stop button and KeyError which happens also when stopping the generation because it tries to check the model at the end which is not loaded at that time, this can be ignored and so thats the reason for the exception.
* separate css to external file
* Added "git pull" and "git stash" to the commands run by the cmd scripts when launching the UI, this should make it so people who use it can automatically update the code from the repo and be up to date without manually using those commands everytime.
* resolve conflict with master
Co-authored-by: EliEron <subanimehd@gmail.com>
Co-authored-by: EliEron <example@example.com>
Co-authored-by: ZeroCool <ZeroCool940711@users.noreply.github.com>
Co-authored-by: ZeroCool940711 <alejandrogilelias940711@gmail.com>
Co-authored-by: Hafiidz <3688500+Hafiidz@users.noreply.github.com>
Co-authored-by: Thomas Mello <work.mello@gmail.com>