mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
update
This commit is contained in:
@@ -34,9 +34,9 @@ Fork does differ in few things:
|
||||
Only Python library which is not auto-updated is `PyTorch` itself as that is very system specific
|
||||
I'm currently using **PyTorch 2.0-nightly** compiled with **CUDA 11.8** and with **Triton** optimizations:
|
||||
|
||||
> pip3 install --pre torch torchvision torchaudio torchtriton --extra-index-url https://download.pytorch.org/whl/nightly/cu118
|
||||
> pip3 install --pre torch torchvision torchaudio torchtriton --extra-index-url https://download.pytorch.org/whl/nightly/cu118 --force
|
||||
> pip show torch
|
||||
> 2.0.0.dev20230111+cu118
|
||||
> 2.0.0.dev20230113+cu118
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
@@ -31,7 +31,6 @@ Things I'm looking into...
|
||||
|
||||
Stuff to be fixed...
|
||||
|
||||
- Model switch memory leak
|
||||
- Torch 2.0 model compile
|
||||
|
||||
Tech that can be integrated as part of the core workflow...
|
||||
@@ -62,6 +61,11 @@ Cool stuff that is not integrated anywhere...
|
||||
- [Disco Diffusion](https://colab.research.google.com/github/alembics/disco-diffusion/blob/main/Disco_Diffusion.ipynb)
|
||||
- [Video Killed the Radio Star](https://colab.research.google.com/github/dmarx/video-killed-the-radio-star/blob/main/Video_Killed_The_Radio_Star_Defusion.ipynb)
|
||||
|
||||
# SDAPI
|
||||
|
||||
- Support TLS
|
||||
- Support auth
|
||||
|
||||
# External
|
||||
|
||||
Ideas that can be value-added to core tech...
|
||||
@@ -69,9 +73,7 @@ Ideas that can be value-added to core tech...
|
||||
- Prevalent colors to interrogate
|
||||
- Auto-Sort inputs by face recognition
|
||||
- Use semantic segmentation to remove background from inputs
|
||||
- Auto-filter training inputs based
|
||||
- Auto-filter training inputs based on blur
|
||||
<https://pyimagesearch.com/2020/06/15/opencv-fast-fourier-transform-fft-for-blur-detection-in-images-and-video-streams/>
|
||||
|
||||
if shared.opts.training_enable_tensorboard and shared.opts.training_tensorboard_save_images:
|
||||
clip_grad_mode
|
||||
/home/vlado/dev/sd-extensions/api/losschart.py:48: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`). Consider using `matplotlib.pyplot.close()`.
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#/bin/env bash
|
||||
|
||||
export PYTORCH_CUDA_ALLOC_CONF=garbage_collection_threshold:0.9,max_split_size_mb:512
|
||||
python launch.py --api --disable-console-progressbars
|
||||
# python launch.py --api --xformers --disable-console-progressbars --opt-channelslast
|
||||
python launch.py --api --xformers --disable-console-progressbars
|
||||
# python launch.py --api --disable-console-progressbars --opt-channelslast
|
||||
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#/bin/env bash
|
||||
echo "Installing xformers"
|
||||
|
||||
NVCC_FLAGS="--use_fast_math"
|
||||
FORCE_CUDA="1"
|
||||
TORCH_CUDA_ARCH_LIST="8.6"
|
||||
pip install ninja -q
|
||||
pip uninstall xformers -y 2>/dev/null
|
||||
pip install -v -U git+https://github.com/facebookresearch/xformers.git@main#egg=xformers
|
||||
pip show torch
|
||||
pip show xformers
|
||||
python -m xformers.info
|
||||
+5
-2
@@ -56,7 +56,7 @@
|
||||
"training_image_repeats_per_epoch": 1,
|
||||
"training_write_csv_every": 10.0,
|
||||
"training_xattention_optimizations": false,
|
||||
"sd_model_checkpoint": "zeipher-f222.ckpt [44bf0551]",
|
||||
"sd_model_checkpoint": "sd-v15-runwayml.ckpt [81761151]",
|
||||
"sd_checkpoint_cache": 0,
|
||||
"sd_vae": "vae-ft-mse-840000-ema-pruned",
|
||||
"sd_vae_as_default": false,
|
||||
@@ -153,5 +153,8 @@
|
||||
"always_discard_next_to_last_sigma": false,
|
||||
"clip_models_path": "models/CLIP",
|
||||
"save_training_settings_to_txt": true,
|
||||
"use_old_hires_fix_width_height": false
|
||||
"use_old_hires_fix_width_height": false,
|
||||
"training_enable_tensorboard": true,
|
||||
"training_tensorboard_save_images": true,
|
||||
"training_tensorboard_flush_every": 60.0
|
||||
}
|
||||
@@ -30,6 +30,10 @@ def get_cuda():
|
||||
except Exception as e:
|
||||
return { 'error': e }
|
||||
|
||||
def get_uptime():
|
||||
s = vars(shared.state)
|
||||
return time.strftime('%c', time.localtime(s.get('server_start', time.time())))
|
||||
|
||||
def get_state():
|
||||
s = vars(shared.state)
|
||||
flags = 'skipped ' if s.get('skipped', False) else ''
|
||||
@@ -193,6 +197,7 @@ def get_full_data():
|
||||
data = {
|
||||
'date': datetime.datetime.now().strftime('%c'),
|
||||
'timestamp': datetime.datetime.now().strftime('%X'),
|
||||
'uptime': get_uptime(),
|
||||
'version': get_version(),
|
||||
'model': get_model(),
|
||||
'vae': get_vae(),
|
||||
@@ -247,6 +252,7 @@ def on_ui_tabs():
|
||||
with gr.Box():
|
||||
with gr.Row():
|
||||
with gr.Column():
|
||||
gr.Textbox(data['uptime'], label = 'Server start time', lines = 1)
|
||||
gr.Textbox(dict2text(data['version']), label = 'Version', lines = len(data['version']))
|
||||
with gr.Column():
|
||||
model = gr.Textbox(dict2text(data['model']), label = 'Model', lines = len(data['model']))
|
||||
|
||||
@@ -103,6 +103,15 @@ class StableDiffusionModelHijack:
|
||||
m.cond_stage_model.model.token_embedding = EmbeddingsWithFixes(m.cond_stage_model.model.token_embedding, self)
|
||||
m.cond_stage_model = sd_hijack_open_clip.FrozenOpenCLIPEmbedderWithCustomWords(m.cond_stage_model, self)
|
||||
|
||||
try:
|
||||
import time
|
||||
t0 = time.time()
|
||||
m = torch.compile(m, mode="max-autotune", fullgraph=True)
|
||||
t1 = time.time()
|
||||
print(f"Model compiled in {round(t1 - t0, 2)} sec")
|
||||
except Exception as err:
|
||||
print(f"Model compile not supported: {err}")
|
||||
|
||||
self.optimization_method = apply_optimizations()
|
||||
|
||||
self.clip = m.cond_stage_model
|
||||
|
||||
Reference in New Issue
Block a user