update torch_info

Signed-off-by: vladmandic <mandic00@live.com>
This commit is contained in:
vladmandic
2026-04-05 10:33:13 +02:00
parent 81d6f84d22
commit 973e137f29
4 changed files with 108 additions and 75 deletions
+4 -1
View File
@@ -1,12 +1,13 @@
# Change Log for SD.Next
## Update for 2026-04-04
## Update for 2026-04-05
- **Models**
- [AiArtLab SDXS-1B](https://huggingface.co/AiArtLab/sdxs-1b) Simple Diffusion XS *(training still in progress)*
this model combines Qwen3.5-1.8B text encoder with SDXL-style UNET with only 1.6B parameters and custom 32ch VAE
- **Compute**
- **ROCm** futher work on advanced configuration and tuning, thanks @resonantsky
now covers both ROCm on Windows and Linux
see *main interface -> scripts -> rocm advanced config*
- **Internal**
- additional typing and typechecks, thanks @awsr
@@ -16,6 +17,8 @@
- detect/warn if space present in system path
- add `ftfy` to requirements
- fix upscaler init error should not block server
- improve torch nvidia arch detection
- add torch amd arch detection
## Update for 2026-04-01
+1 -2
View File
@@ -1,7 +1,5 @@
# TODO
<https://github.com/huggingface/diffusers/pull/13317>
## Internal
- Feature: implement `unload_auxiliary_models`
@@ -48,6 +46,7 @@ TODO: Investigate which models are diffusers-compatible and prioritize!
### Image-Base
- [NucleusMoe](<https://github.com/huggingface/diffusers/pull/13317)
- [Chroma Zeta](https://huggingface.co/lodestones/Zeta-Chroma): Image and video generator for creative effects and professional filters
- [Chroma Radiance](https://huggingface.co/lodestones/Chroma1-Radiance): Pixel-space model eliminating VAE artifacts for high visual fidelity
- [Bria FIBO](https://huggingface.co/briaai/FIBO): Fully JSON based
+102 -71
View File
@@ -762,13 +762,34 @@ def check_cudnn():
def get_cuda_arch(capability):
major, minor = capability
mapping = {9: "Hopper",
8: "Ada Lovelace" if minor == 9 else "Ampere",
7: "Turing" if minor == 5 else "Volta",
6: "Pascal",
5: "Maxwell",
3: "Kepler"}
name = mapping.get(major, "Unknown")
if torch_info.get('cuda', None) is not None:
mapping = {
12: "Blackwell",
10: "Blackwell",
9: "Hopper",
8: "Ada Lovelace" if minor == 9 else "Ampere",
7: "Turing" if minor == 5 else "Volta",
6: "Pascal",
5: "Maxwell",
4: "Kepler",
3: "Kepler",
2: "Fermi",
}
name = mapping.get(major, "")
elif torch_info.get('rocm', None) is not None:
mapping = {
(8, 0): "GCN",
(9, 0): "Vega",
(9, 4): "Vega",
(9, 6): "Vega",
(10, 1): "RDNA1",
(10, 3): "RDNA2",
(11, 0): "RDNA3",
(11, 5): "CDNA3",
}
name = mapping.get((major, minor), "")
else:
name = ''
return f"{major}.{minor} {name}"
@@ -856,74 +877,84 @@ def check_torch():
pass
torch_info.set(version=torch.__version__)
if 'cpu' in torch.__version__:
if is_cuda_available:
if args.use_cuda:
log.warning(f'Torch: version="{torch.__version__}" CPU version installed and CUDA is selected - reinstalling')
install(torch_command, 'torch torchvision', quiet=True, reinstall=True, force=True) # foce reinstall
try:
if is_cuda_available:
if args.use_cuda:
log.warning(f'Torch: version="{torch.__version__}" CPU version installed and CUDA is selected - reinstalling')
install(torch_command, 'torch torchvision', quiet=True, reinstall=True, force=True) # foce reinstall
else:
log.warning(f'Torch: version="{torch.__version__}" CPU version installed and CUDA is available - consider reinstalling')
elif is_rocm_available:
if args.use_rocm:
log.warning(f'Torch: version="{torch.__version__}" CPU version installed and ROCm is selected - reinstalling')
install(torch_command, 'torch torchvision', quiet=True, reinstall=True, force=True) # foce reinstall
else:
log.warning(f'Torch: version="{torch.__version__}" CPU version installed and ROCm is available - consider reinstalling')
if args.use_openvino:
torch_info.set(type='openvino')
else:
log.warning(f'Torch: version="{torch.__version__}" CPU version installed and CUDA is available - consider reinstalling')
elif is_rocm_available:
if args.use_rocm:
log.warning(f'Torch: version="{torch.__version__}" CPU version installed and ROCm is selected - reinstalling')
install(torch_command, 'torch torchvision', quiet=True, reinstall=True, force=True) # foce reinstall
else:
log.warning(f'Torch: version="{torch.__version__}" CPU version installed and ROCm is available - consider reinstalling')
if args.use_openvino:
torch_info.set(type='openvino')
else:
torch_info.set(type='cpu')
torch_info.set(type='cpu')
except Exception as e:
log.error(f'Torch: type=cpu {e}')
if hasattr(torch, "xpu") and torch.xpu.is_available() and allow_ipex:
if shutil.which('icpx') is not None:
log.info(f'{os.popen("icpx --version").read().rstrip()}')
torch_info.set(type='xpu')
for device in range(torch.xpu.device_count()):
props = torch.xpu.get_device_properties(device)
gpu = {
'gpu': torch.xpu.get_device_name(device),
'platform': props.platform_name,
'driver': props.driver_version,
'vram': round(props.total_memory / 1024 / 1024),
'units': props.max_compute_units,
}
log.info(f'Torch detected: {gpu}')
gpu_info.append(gpu)
elif torch.cuda.is_available() and (allow_cuda or allow_rocm):
if args.use_zluda:
torch_info.set(type="zluda", cuda=torch.version.cuda)
elif torch.version.cuda and allow_cuda:
torch_info.set(type='cuda', cuda=torch.version.cuda, cudnn=torch.backends.cudnn.version() if torch.backends.cudnn.is_available() else 'N/A')
elif torch.version.hip and allow_rocm:
torch_info.set(type='rocm', hip=torch.version.hip)
else:
log.warning('Torch backend: cannot detect type')
log.info(f"Torch backend: {torch_info}")
for device in [torch.cuda.device(i) for i in range(torch.cuda.device_count())]:
gpu = {
'gpu': torch.cuda.get_device_name(device),
'vram': round(torch.cuda.get_device_properties(device).total_memory / 1024 / 1024),
'arch': get_cuda_arch(torch.cuda.get_device_capability(device)),
'cores': torch.cuda.get_device_properties(device).multi_processor_count,
}
gpu_info.append(gpu)
log.info(f'Torch detected: {gpu}')
else:
try:
if args.use_directml and allow_directml:
import torch_directml # pylint: disable=import-error
dml_ver = package_version("torch-directml")
log.warning(f'Torch backend: DirectML ({dml_ver})')
log.warning('DirectML: end-of-life')
for i in range(0, torch_directml.device_count()):
gpu = {
'gpu': torch_directml.device_name(i),
}
gpu_info.append(gpu)
log.info(f'Torch detected GPU: {gpu}')
except Exception:
log.warning("Torch reports CUDA not available")
if shutil.which('icpx') is not None:
log.info(f'{os.popen("icpx --version").read().rstrip()}')
torch_info.set(type='xpu')
for device in range(torch.xpu.device_count()):
props = torch.xpu.get_device_properties(device)
gpu = {
'gpu': torch.xpu.get_device_name(device),
'platform': props.platform_name,
'driver': props.driver_version,
'vram': round(props.total_memory / 1024 / 1024),
'units': props.max_compute_units,
}
log.info(f'Torch detected: {gpu}')
gpu_info.append(gpu)
except Exception as e:
log.error(f'Torch: type=xpu {e}')
if torch.cuda.is_available() and (allow_cuda or allow_rocm):
try:
if args.use_zluda:
torch_info.set(type="zluda", cuda=torch.version.cuda)
elif torch.version.cuda and allow_cuda:
torch_info.set(type='cuda', cuda=torch.version.cuda, cudnn=torch.backends.cudnn.version() if torch.backends.cudnn.is_available() else 'N/A')
elif torch.version.hip and allow_rocm:
torch_info.set(type='rocm', hip=torch.version.hip)
else:
log.warning('Torch backend: cannot detect type')
log.info(f"Torch backend: {torch_info}")
for device in [torch.cuda.device(i) for i in range(torch.cuda.device_count())]:
props = torch.cuda.get_device_properties(device)
gpu = {
'gpu': torch.cuda.get_device_name(device),
'vram': round(props.total_memory / 1024 / 1024),
'arch': get_cuda_arch(torch.cuda.get_device_capability(device)),
'cores': props.multi_processor_count,
}
gpu_info.append(gpu)
log.info(f'Torch detected: {gpu}')
except Exception as e:
log.error(f'Torch: type=cuda/rocm {e}')
if args.use_directml and allow_directml:
try:
import torch_directml # pylint: disable=import-error
dml_ver = package_version("torch-directml")
log.warning(f'Torch backend: DirectML ({dml_ver})')
log.warning('DirectML: end-of-life')
for i in range(0, torch_directml.device_count()):
gpu = {
'gpu': torch_directml.device_name(i),
}
gpu_info.append(gpu)
log.info(f'Torch detected: {gpu}')
except Exception as e:
log.warning(f"Torch: type=directml {e}")
except Exception as e:
log.error(f'Torch cannot load: {e}')
if not args.ignore:
+1 -1
View File
@@ -20,7 +20,7 @@ class ConnectionMonitorState {
static setData({ online, data }) {
this.online = online;
if (data?.version) this.version = data.version;
if (data?.updated) this.version = data.updated;
if (data?.commit) this.commit = data.commit;
if (data?.branch) this.branch = data.branch;
if (data?.model) this.model = this.trimModelName(data.model);