Merge branch 'beta' into bucketlite

This commit is contained in:
JeLuF 2023-08-06 22:57:40 +02:00
commit fbdee0e6ba
11 changed files with 25 additions and 19 deletions

View File

@ -22,6 +22,7 @@
Our focus continues to remain on an easy installation experience, and an easy user-interface. While still remaining pretty powerful, in terms of features and speed. Our focus continues to remain on an easy installation experience, and an easy user-interface. While still remaining pretty powerful, in terms of features and speed.
### Detailed changelog ### Detailed changelog
* 3.0.0 - 3 Aug 2023 - Enabled diffusers for everyone by default. The old v2 engine can be used by disabling the "Use v3 engine" option in the Settings tab.
* 2.5.48 - 1 Aug 2023 - (beta-only) Full support for ControlNets. You can select a control image to guide the AI. You can pick a filter to pre-process the image, and one of the known (or custom) controlnet models. Supports `OpenPose`, `Canny`, `Straight Lines`, `Depth`, `Line Art`, `Scribble`, `Soft Edge`, `Shuffle` and `Segment`. * 2.5.48 - 1 Aug 2023 - (beta-only) Full support for ControlNets. You can select a control image to guide the AI. You can pick a filter to pre-process the image, and one of the known (or custom) controlnet models. Supports `OpenPose`, `Canny`, `Straight Lines`, `Depth`, `Line Art`, `Scribble`, `Soft Edge`, `Shuffle` and `Segment`.
* 2.5.47 - 30 Jul 2023 - An option to use `Strict Mask Border` while inpainting, to avoid touching areas outside the mask. But this might show a slight outline of the mask, which you will have to touch up separately. * 2.5.47 - 30 Jul 2023 - An option to use `Strict Mask Border` while inpainting, to avoid touching areas outside the mask. But this might show a slight outline of the mask, which you will have to touch up separately.
* 2.5.47 - 29 Jul 2023 - (beta-only) Fix long prompts with SDXL. * 2.5.47 - 29 Jul 2023 - (beta-only) Fix long prompts with SDXL.

View File

@ -18,7 +18,7 @@ os_name = platform.system()
modules_to_check = { modules_to_check = {
"torch": ("1.11.0", "1.13.1", "2.0.0"), "torch": ("1.11.0", "1.13.1", "2.0.0"),
"torchvision": ("0.12.0", "0.14.1", "0.15.1"), "torchvision": ("0.12.0", "0.14.1", "0.15.1"),
"sdkit": "1.0.165", "sdkit": "1.0.167",
"stable-diffusion-sdkit": "2.1.4", "stable-diffusion-sdkit": "2.1.4",
"rich": "12.6.0", "rich": "12.6.0",
"uvicorn": "0.19.0", "uvicorn": "0.19.0",

View File

@ -61,6 +61,7 @@ APP_CONFIG_DEFAULTS = {
"ui": { "ui": {
"open_browser_on_start": True, "open_browser_on_start": True,
}, },
"test_diffusers": True,
} }
IMAGE_EXTENSIONS = [ IMAGE_EXTENSIONS = [
@ -116,7 +117,7 @@ def getConfig(default_val=APP_CONFIG_DEFAULTS):
def set_config_on_startup(config: dict): def set_config_on_startup(config: dict):
if getConfig.__test_diffusers_on_startup is None: if getConfig.__test_diffusers_on_startup is None:
getConfig.__test_diffusers_on_startup = config.get("test_diffusers", False) getConfig.__test_diffusers_on_startup = config.get("test_diffusers", True)
config["config_on_startup"] = {"test_diffusers": getConfig.__test_diffusers_on_startup} config["config_on_startup"] = {"test_diffusers": getConfig.__test_diffusers_on_startup}
if os.path.isfile(config_yaml_path): if os.path.isfile(config_yaml_path):

View File

@ -12,9 +12,9 @@ from easydiffusion import app
manifest = { manifest = {
"tensorrt": { "tensorrt": {
"install": [ "install": [
"nvidia-cudnn --extra-index-url=https://pypi.ngc.nvidia.com --trusted-host pypi.ngc.nvidia.com", "nvidia-cudnn --pre --extra-index-url=https://pypi.ngc.nvidia.com --trusted-host pypi.ngc.nvidia.com",
"tensorrt-libs --extra-index-url=https://pypi.ngc.nvidia.com --trusted-host pypi.ngc.nvidia.com", "tensorrt-libs --pre --extra-index-url=https://pypi.ngc.nvidia.com --trusted-host pypi.ngc.nvidia.com",
"tensorrt --extra-index-url=https://pypi.ngc.nvidia.com --trusted-host pypi.ngc.nvidia.com", "tensorrt --pre --extra-index-url=https://pypi.ngc.nvidia.com --trusted-host pypi.ngc.nvidia.com",
], ],
"uninstall": ["tensorrt"], "uninstall": ["tensorrt"],
# TODO also uninstall tensorrt-libs and nvidia-cudnn, but do it upon restarting (avoid 'file in use' error) # TODO also uninstall tensorrt-libs and nvidia-cudnn, but do it upon restarting (avoid 'file in use' error)
@ -25,7 +25,7 @@ installing = []
# remove this once TRT releases on pypi # remove this once TRT releases on pypi
if platform.system() == "Windows": if platform.system() == "Windows":
trt_dir = os.path.join(app.ROOT_DIR, "tensorrt") trt_dir = os.path.join(app.ROOT_DIR, "tensorrt")
if os.path.exists(trt_dir): if os.path.exists(trt_dir) and os.path.isdir(trt_dir) and len(os.listdir(trt_dir)) > 0:
files = os.listdir(trt_dir) files = os.listdir(trt_dir)
packages = manifest["tensorrt"]["install"] packages = manifest["tensorrt"]["install"]
@ -61,6 +61,10 @@ def install(module_name):
raise RuntimeError(f"Can't install unknown package: {module_name}!") raise RuntimeError(f"Can't install unknown package: {module_name}!")
commands = manifest[module_name]["install"] commands = manifest[module_name]["install"]
if module_name == "tensorrt":
commands += [
"protobuf==3.20.3 polygraphy==0.47.1 onnx==1.14.0 --extra-index-url=https://pypi.ngc.nvidia.com --trusted-host pypi.ngc.nvidia.com"
]
commands = [f"python -m pip install --upgrade {cmd}" for cmd in commands] commands = [f"python -m pip install --upgrade {cmd}" for cmd in commands]
installing.append(module_name) installing.append(module_name)

View File

@ -31,7 +31,7 @@ def init(device):
app_config = app.getConfig() app_config = app.getConfig()
context.test_diffusers = ( context.test_diffusers = (
app_config.get("test_diffusers", False) and app_config.get("update_branch", "main") != "main" app_config.get("test_diffusers", True) and app_config.get("update_branch", "main") != "main"
) )
log.info("Device usage during initialization:") log.info("Device usage during initialization:")

View File

@ -63,7 +63,7 @@ class SetAppConfigRequest(BaseModel, extra=Extra.allow):
ui_open_browser_on_start: bool = None ui_open_browser_on_start: bool = None
listen_to_network: bool = None listen_to_network: bool = None
listen_port: int = None listen_port: int = None
test_diffusers: bool = False test_diffusers: bool = True
def init(): def init():

View File

@ -219,7 +219,7 @@ def get_printable_request(req: GenerateImageRequest, task_data: TaskData, output
task_data_metadata.update(output_format.dict()) task_data_metadata.update(output_format.dict())
app_config = app.getConfig() app_config = app.getConfig()
using_diffusers = app_config.get("test_diffusers", False) using_diffusers = app_config.get("test_diffusers", True)
# Save the metadata in the order defined in TASK_TEXT_MAPPING # Save the metadata in the order defined in TASK_TEXT_MAPPING
metadata = {} metadata = {}

View File

@ -34,7 +34,7 @@
<h1> <h1>
<img id="logo_img" src="/media/images/icon-512x512.png" > <img id="logo_img" src="/media/images/icon-512x512.png" >
Easy Diffusion Easy Diffusion
<small><span id="version">v2.5.48</span> <span id="updateBranchLabel"></span></small> <small><span id="version">v3.0.0</span> <span id="updateBranchLabel"></span></small>
</h1> </h1>
</div> </div>
<div id="server-status"> <div id="server-status">

View File

@ -1,11 +1,12 @@
from easydiffusion import model_manager, app, server, bucket_manager from easydiffusion import model_manager, app, server, bucket_manager
from easydiffusion.server import server_api # required for uvicorn from easydiffusion.server import server_api # required for uvicorn
app.init()
server.init() server.init()
# Init the app # Init the app
model_manager.init() model_manager.init()
app.init()
app.init_render_threads() app.init_render_threads()
bucket_manager.init() bucket_manager.init()

View File

@ -2827,10 +2827,6 @@ embeddingsCollapsiblesBtn.addEventListener("click", (e) => {
} }
}) })
if (testDiffusers.checked) {
document.getElementById("embeddings-container").classList.remove("displayNone")
}
/* Pause function */ /* Pause function */
document.querySelectorAll(".tab").forEach(linkTabContents) document.querySelectorAll(".tab").forEach(linkTabContents)

View File

@ -239,11 +239,11 @@ var PARAMETERS = [
{ {
id: "test_diffusers", id: "test_diffusers",
type: ParameterType.checkbox, type: ParameterType.checkbox,
label: "Test Diffusers", label: "Use the new v3 engine (diffusers)",
note: note:
"<b>Experimental! Can have bugs!</b> Use upcoming features (like LoRA) in our new engine. Please press Save, then restart the program after changing this.", "Use our new v3 engine, with additional features like LoRA, ControlNet, SDXL, Embeddings, Tiling and lots more! Please press Save, then restart the program after changing this.",
icon: "fa-bolt", icon: "fa-bolt",
default: false, default: true,
saveInAppConfig: true, saveInAppConfig: true,
}, },
{ {
@ -465,7 +465,10 @@ async function getAppConfig() {
listenPortField.value = config.net.listen_port listenPortField.value = config.net.listen_port
} }
const testDiffusersEnabled = config.test_diffusers && config.update_branch !== "main" let testDiffusersEnabled = config.update_branch !== "main"
if (config.test_diffusers === false) {
testDiffusersEnabled = false
}
testDiffusers.checked = testDiffusersEnabled testDiffusers.checked = testDiffusersEnabled
if (config.config_on_startup) { if (config.config_on_startup) {