Skip to content

Commit e8b8aad

Browse files
committed
local iframeResizer
load iframeResizer from webui assets ASSETS_COMMIT_HASH needs to be updated accordingly after AUTOMATIC1111/stable-diffusion-webui-assets#2 is merged
1 parent eed3b43 commit e8b8aad

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

modules/launch_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ def prepare_environment():
351351
k_diffusion_repo = os.environ.get('K_DIFFUSION_REPO', 'https://github.com/crowsonkb/k-diffusion.git')
352352
blip_repo = os.environ.get('BLIP_REPO', 'https://github.com/salesforce/BLIP.git')
353353

354-
assets_commit_hash = os.environ.get('ASSETS_COMMIT_HASH', "6f7db241d2f8ba7457bac5ca9753331f0c266917")
354+
assets_commit_hash = os.environ.get('ASSETS_COMMIT_HASH', "7f336b3349d3758075cddc81e9b1d134fb60b05b")
355355
stable_diffusion_commit_hash = os.environ.get('STABLE_DIFFUSION_COMMIT_HASH', "cf1d67a6fd5ea1aa600c4df58e5b47da45f6bdbf")
356356
stable_diffusion_xl_commit_hash = os.environ.get('STABLE_DIFFUSION_XL_COMMIT_HASH', "45c443b316737a4ab6e40413d7794a7f5657c19f")
357357
k_diffusion_commit_hash = os.environ.get('K_DIFFUSION_COMMIT_HASH', "ab527a9a6d347f364e3d185ba6d714e22d80cb3c")

modules/ui_gradio_extensions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ def template_response(*args, **kwargs):
6262

6363
# remove preconnects
6464
res.body = re_preconnect.sub(b'', res.body)
65-
65+
# replace iframeResizer with local version
66+
res.body = res.body.replace(b'src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.6/iframeResizer.contentWindow.min.js"', b'src="webui-assets/js/iframe-resizer/4.3.6/iframeResizer.contentWindow.min.js"')
67+
6668
res.body = res.body.replace(b'</head>', f'{js}<meta name="referrer" content="no-referrer"/></head>'.encode("utf8"))
6769
res.body = res.body.replace(b'</body>', f'{css}</body>'.encode("utf8"))
6870
res.init_headers()

0 commit comments

Comments
 (0)