Include the gpu id in the gpu list and system info

This commit is contained in:
cmdr2 2022-11-14 20:01:57 +05:30
parent 9d37ea23f8
commit 125a50ae87
2 changed files with 5 additions and 4 deletions

View File

@ -330,7 +330,7 @@
<script src="media/js/inpainting-editor.js?v=1"></script>
<script src="media/js/image-modifiers.js?v=6"></script>
<script src="media/js/auto-save.js?v=8"></script>
<script src="media/js/main.js?v=17"></script>
<script src="media/js/main.js?v=18"></script>
<script src="media/js/themes.js?v=4"></script>
<script src="media/js/dnd.js?v=9"></script>
<script>

View File

@ -193,8 +193,9 @@ function setSystemInfo(devices) {
let cpu = devices.all.cpu
let allGPUs = Object.keys(devices.all).filter(d => d != 'cpu')
let activeGPUs = Object.keys(devices.active)
allGPUs = allGPUs.map(d => devices.all[d])
activeGPUs = activeGPUs.map(d => devices.all[d]).map(d => `${d}<br/>`)
const ID_TO_TEXT = d => `${devices.all[d]} (${d})`
allGPUs = allGPUs.map(ID_TO_TEXT)
activeGPUs = activeGPUs.map(ID_TO_TEXT)
let systemInfo = `
<h1>System Info</h1>
@ -1422,7 +1423,7 @@ async function getDevices() {
useGPUsField.innerHTML = ''
allDeviceIds.forEach(device => {
let deviceName = res['all'][device]
let deviceOption = `<option value="${device}">${deviceName}</option>`
let deviceOption = `<option value="${device}">${deviceName} (${device})</option>`
useGPUsField.insertAdjacentHTML('beforeend', deviceOption)
})