mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 16:54:33 +02:00
fix prompt display
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
# Change Log for SD.Next
|
||||
|
||||
## Update for 2023-11-24
|
||||
|
||||
- **General**
|
||||
- increase maximum lora cache values
|
||||
- fixes for python 3.9 compatibility
|
||||
- fix prompt display in process tab
|
||||
|
||||
## Update for 2023-11-23
|
||||
|
||||
New release, primarily focused around three major new features: full **LCM** support, completely new **Model Merge** functionality and **Stable-fast** compile support
|
||||
|
||||
+3
-4
@@ -421,7 +421,6 @@ def check_torch():
|
||||
log.debug(f'ROCm hipconfig failed: {e}')
|
||||
rocm_ver = None
|
||||
if rocm_ver in {"5.7"}:
|
||||
# install torch nightly via torchvision to avoid wasting bandwidth when torchvision depends on torch from yesterday
|
||||
torch_command = os.environ.get('TORCH_COMMAND', f'torch torchvision --pre --index-url https://download.pytorch.org/whl/nightly/rocm{rocm_ver}')
|
||||
elif rocm_ver in {"5.5", "5.6"}:
|
||||
torch_command = os.environ.get('TORCH_COMMAND', f'torch torchvision --index-url https://download.pytorch.org/whl/nightly/rocm{rocm_ver}')
|
||||
@@ -443,7 +442,7 @@ def check_torch():
|
||||
ipex_pip = 'https://github.com/Nuullll/intel-extension-for-pytorch/releases/download/v2.0.110%2Bxpu-master%2Bdll-bundle/intel_extension_for_pytorch-2.0.110+gitc6ea20b-cp310-cp310-win_amd64.whl'
|
||||
torch_command = os.environ.get('TORCH_COMMAND', f'{pytorch_pip} {torchvision_pip} {ipex_pip}')
|
||||
install('openvino', 'openvino', ignore=True)
|
||||
install('onnxruntime-openvino', 'onnxruntime-openvino', ignore=True) # TODO numpy version conflicts with tensorflow and doesn't support Python 3.11
|
||||
install('onnxruntime-openvino', 'onnxruntime-openvino', ignore=True)
|
||||
elif allow_openvino and args.use_openvino:
|
||||
log.info('Using OpenVINO')
|
||||
torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.1.1 torchvision==0.16.1 --index-url https://download.pytorch.org/whl/cpu')
|
||||
@@ -514,9 +513,9 @@ def check_torch():
|
||||
if opts.get('cuda_compile_backend', '') == 'hidet':
|
||||
install('hidet', 'hidet')
|
||||
if args.use_openvino or opts.get('cuda_compile_backend', '') == 'openvino_fx':
|
||||
uninstall('openvino-nightly') # TODO remove after people had enough time upgrading
|
||||
uninstall('openvino-nightly') # TODO openvino: remove after people had enough time upgrading
|
||||
install('openvino==2023.2.0', 'openvino')
|
||||
install('onnxruntime-openvino', 'onnxruntime-openvino', ignore=True) # TODO numpy version conflicts with tensorflow and doesn't support Python 3.11
|
||||
install('onnxruntime-openvino', 'onnxruntime-openvino', ignore=True) # TODO openvino: numpy version conflicts with tensorflow and doesn't support Python 3.11
|
||||
os.environ.setdefault('PYTORCH_TRACING_MODE', 'TORCHFX')
|
||||
os.environ.setdefault('NEOReadDebugKeys', '1')
|
||||
os.environ.setdefault('ClDeviceGlobalMemSizeAvailablePercent', '100')
|
||||
|
||||
@@ -95,7 +95,7 @@ div#extras_scale_to_tab div.form{ flex-direction: row; }
|
||||
#img2img_sketch, #img2maskimg, #inpaint_sketch { overflow: overlay !important; resize: auto; background: var(--panel-background-fill); z-index: 5; }
|
||||
.image-buttons button{ min-width: auto; }
|
||||
.infotext { overflow-wrap: break-word; line-height: 1.5em; }
|
||||
.infotext > p { padding-left: 1em; text-indent: -1em; }
|
||||
.infotext > p { padding-left: 1em; text-indent: -1em; white-space: pre; }
|
||||
.tooltip { display: block; position: fixed; top: 1em; right: 1em; padding: 0.5em; background: var(--input-background-fill); color: var(--body-text-color); border: 1pt solid var(--button-primary-border-color);
|
||||
width: 22em; min-height: 1.3em; font-size: 0.8em; transition: opacity 0.2s ease-in; pointer-events: none; opacity: 0; z-index: 999; }
|
||||
.tooltip-show { opacity: 0.9; }
|
||||
|
||||
@@ -35,16 +35,16 @@ def plaintext_to_html(text):
|
||||
|
||||
def infotext_to_html(text):
|
||||
res = parse_generation_parameters(text)
|
||||
prompt = res.get('Prompt', None)
|
||||
negative = res.get('Negative prompt', None)
|
||||
prompt = res.get('Prompt', '').replace('\n', '<br>\n')
|
||||
negative = res.get('Negative prompt', '')
|
||||
res.pop('Prompt', None)
|
||||
res.pop('Negative prompt', None)
|
||||
params = [f'{k}: {v}' for k, v in res.items() if v is not None]
|
||||
params = '| '.join(params)
|
||||
params = '| '.join(params) if len(params) > 0 else ''
|
||||
code = f'''
|
||||
<p><b>Prompt:</b> {prompt}</p>
|
||||
<p><b>Negative:</b> {negative}</p>
|
||||
<p><b>Parameters:</b> {params}</p>
|
||||
<p><b>Prompt:</b> {html.escape(prompt)}</p>
|
||||
<p><b>Negative:</b> {html.escape(negative)}</p>
|
||||
<p><b>Parameters:</b> {html.escape(params)}</p>
|
||||
'''
|
||||
return code
|
||||
|
||||
|
||||
Reference in New Issue
Block a user