mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-06 02:30:30 -08:00
Merge pull request #6402 from brkirch/work-with-nightly-local-builds
Add support for using PyTorch nightly and local builds
This commit is contained in:
commit
85fa4eacea
2 changed files with 29 additions and 6 deletions
7
webui.py
7
webui.py
|
|
@ -4,7 +4,7 @@ import threading
|
|||
import time
|
||||
import importlib
|
||||
import signal
|
||||
import threading
|
||||
import re
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from fastapi.middleware.gzip import GZipMiddleware
|
||||
|
|
@ -13,6 +13,11 @@ from modules import import_hook, errors
|
|||
from modules.call_queue import wrap_queued_call, queue_lock, wrap_gradio_gpu_call
|
||||
from modules.paths import script_path
|
||||
|
||||
import torch
|
||||
# Truncate version number of nightly/local build of PyTorch to not cause exceptions with CodeFormer or Safetensors
|
||||
if ".dev" in torch.__version__ or "+git" in torch.__version__:
|
||||
torch.__version__ = re.search(r'[\d.]+', torch.__version__).group(0)
|
||||
|
||||
from modules import shared, devices, sd_samplers, upscaler, extensions, localization, ui_tempdir
|
||||
import modules.codeformer_model as codeformer
|
||||
import modules.extras
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue