update unipc

This commit is contained in:
Vladimir Mandic
2023-03-13 13:10:44 -04:00
parent f2e9991de5
commit 08f170f87a
10 changed files with 15 additions and 14 deletions
+3
View File
@@ -1,12 +1,14 @@
#!/bin/env bash
export TF_CPP_MIN_LOG_LEVEL=2
export ACCELERATE="True"
export FORCE_CUDA="1"
export ATTN_PRECISION=fp16
export PYTORCH_CUDA_ALLOC_CONF=garbage_collection_threshold:0.9,max_split_size_mb:512
export CUDA_LAUNCH_BLOCKING=0
export CUDA_CACHE_DISABLE=0
export CUDA_AUTO_BOOST=1
export CUDA_MODULE_LOADING="LAZY"
export CUDA_DEVICE_DEFAULT_PERSISTING_L2_CACHE_PERCENTAGE_LIMIT=0
if [ "$PYTHON" == "" ]; then
@@ -151,6 +153,7 @@ if [ $MODE == optimized ]; then
fi
exec accelerate launch --no_python --quiet --num_cpu_threads_per_process=6 "$PYTHON" $CMD
# exec "$PYTHON" $CMD
# export LD_PRELOAD=libtcmalloc.so
# TORCH_CUDA_ARCH_LIST="8.6"
-6
View File
@@ -94,10 +94,4 @@ Inference-only backends:
dynamo.optimize("ofi") - Uses Torchscript optimize_for_inference
dynamo.optimize("fx2trt") - Uses Nvidia TensorRT for inference optimizations
dynamo.optimize("onnxrt") - Uses ONNXRT for inference on CPU/GPU
Results:
"default": 4.247040033340454,
"ofi": 3.820032000541687,
"aot_cudagraphs": 6.460927963256836,
"inductor": RuntimeError: CUDA: Error- no device
"fx2trt": ImportError: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory
"""
+1 -1
View File
@@ -132,7 +132,7 @@
"localization": "None",
"lora_apply_to_outputs": false,
"memmon_poll_rate": 1,
"multiple_tqdm": true,
"multiple_tqdm": false,
"n_rows": -1,
"no_dpmpp_sde_batch_determinism": false,
"outdir_extras_samples": "outputs/extras",
+2 -1
View File
@@ -1,6 +1,7 @@
import torch
import torch.nn.functional as F
import math
from tqdm.auto import trange
class NoiseScheduleVP:
@@ -766,7 +767,7 @@ class UniPC:
self.after_update(x, model_x)
model_prev_list.append(model_x)
t_prev_list.append(vec_t)
for step in range(order, steps + 1):
for step in trange(order, steps + 1):
vec_t = timesteps[step].expand(x.shape[0])
if lower_order_final:
step_order = min(order, steps + 1 - step)
+1 -1
View File
@@ -1032,7 +1032,7 @@
"customscript/save_steps_animation.py/img2img/Skip steps/maximum": 100,
"customscript/save_steps_animation.py/img2img/Skip steps/minimum": 0,
"customscript/save_steps_animation.py/img2img/Skip steps/step": 1,
"customscript/save_steps_animation.py/img2img/Skip steps/value": 5,
"customscript/save_steps_animation.py/img2img/Skip steps/value": 0,
"customscript/save_steps_animation.py/img2img/Skip steps/visible": true,
"customscript/save_steps_animation.py/txt2img/Codec/value": "x264",
"customscript/save_steps_animation.py/txt2img/Codec/visible": true,
+4 -1
View File
@@ -289,7 +289,10 @@ def webui():
print(f"Startup time: {startup_timer.summary()}.")
wait_on_server(shared.demo)
try:
wait_on_server(shared.demo)
except KeyboardInterrupt as e:
pass
print('Restarting UI...')
startup_timer.reset()