diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-31 04:37:36 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-31 04:37:36 +0000 |
commit | 20158d77d9fa37dbbd38e5a281e29560caf4a337 (patch) | |
tree | 7761c9fecfd8ca6656d56c5300181a5ec3d1a98a /modules | |
parent | 3bff988f1e66a215b4795be012c868d06e0417c9 (diff) | |
parent | e7965a5eb804a51e949df07c66c0b7c61ab7fa7b (diff) | |
download | stable-diffusion-webui-gfx803-20158d77d9fa37dbbd38e5a281e29560caf4a337.tar.gz stable-diffusion-webui-gfx803-20158d77d9fa37dbbd38e5a281e29560caf4a337.tar.bz2 stable-diffusion-webui-gfx803-20158d77d9fa37dbbd38e5a281e29560caf4a337.zip |
Merge branch 'release_candidate' into dev
Diffstat (limited to 'modules')
-rw-r--r-- | modules/cmd_args.py | 1 | ||||
-rw-r--r-- | modules/launch_utils.py | 13 | ||||
-rw-r--r-- | modules/processing.py | 2 | ||||
-rw-r--r-- | modules/sd_samplers_common.py | 2 |
4 files changed, 17 insertions, 1 deletions
diff --git a/modules/cmd_args.py b/modules/cmd_args.py index f0f361bd..aab62286 100644 --- a/modules/cmd_args.py +++ b/modules/cmd_args.py @@ -16,6 +16,7 @@ parser.add_argument("--test-server", action='store_true', help="launch.py argume parser.add_argument("--log-startup", action='store_true', help="launch.py argument: print a detailed log of what's happening at startup")
parser.add_argument("--skip-prepare-environment", action='store_true', help="launch.py argument: skip all environment preparation")
parser.add_argument("--skip-install", action='store_true', help="launch.py argument: skip installation of packages")
+parser.add_argument("--dump-sysinfo", action='store_true', help="launch.py argument: dump limited sysinfo file (without information about extensions, options) to disk and quit")
parser.add_argument("--loglevel", type=str, help="log level; one of: CRITICAL, ERROR, WARNING, INFO, DEBUG", default=None)
parser.add_argument("--do-not-download-clip", action='store_true', help="do not download CLIP model even if it's not included in the checkpoint")
parser.add_argument("--data-dir", type=str, default=os.path.dirname(os.path.dirname(os.path.realpath(__file__))), help="base path where all user data is stored")
diff --git a/modules/launch_utils.py b/modules/launch_utils.py index 05488fe6..6e54d063 100644 --- a/modules/launch_utils.py +++ b/modules/launch_utils.py @@ -434,3 +434,16 @@ def start(): webui.api_only()
else:
webui.webui()
+
+
+def dump_sysinfo():
+ from modules import sysinfo
+ import datetime
+
+ text = sysinfo.get()
+ filename = f"sysinfo-{datetime.datetime.utcnow().strftime('%Y-%m-%d-%H-%M')}.txt"
+
+ with open(filename, "w", encoding="utf8") as file:
+ file.write(text)
+
+ return filename
diff --git a/modules/processing.py b/modules/processing.py index e08b6305..e124e7f0 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -1315,7 +1315,7 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): if shared.opts.hires_fix_use_firstpass_conds:
self.calculate_hr_conds()
- elif lowvram.is_enabled(shared.sd_model): # if in lowvram mode, we need to calculate conds right away, before the cond NN is unloaded
+ elif lowvram.is_enabled(shared.sd_model) and shared.sd_model.sd_checkpoint_info == sd_models.select_checkpoint(): # if in lowvram mode, we need to calculate conds right away, before the cond NN is unloaded
with devices.autocast():
extra_networks.activate(self, self.hr_extra_network_data)
diff --git a/modules/sd_samplers_common.py b/modules/sd_samplers_common.py index 6c935a38..58efcad2 100644 --- a/modules/sd_samplers_common.py +++ b/modules/sd_samplers_common.py @@ -95,6 +95,8 @@ def images_tensor_to_samples(image, approximation=None, model=None): else:
if model is None:
model = shared.sd_model
+ model.first_stage_model.to(devices.dtype_vae)
+
image = image.to(shared.device, dtype=devices.dtype_vae)
image = image * 2 - 1
if len(image) > 1:
|