mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-04-16 23:48:25 +02:00
Fix a bug where the device wouldn't get set if no cuda-compatible hardware was found
This commit is contained in:
parent
01a2fa7c2d
commit
554650c18d
@ -1,7 +1,7 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
@copy sd-ui-files\scripts\on_env_start.bat scripts\ /Y
|
@REM @copy sd-ui-files\scripts\on_env_start.bat scripts\ /Y
|
||||||
@copy sd-ui-files\scripts\bootstrap.bat scripts\ /Y
|
@REM @copy sd-ui-files\scripts\bootstrap.bat scripts\ /Y
|
||||||
|
|
||||||
if exist "%cd%\profile" (
|
if exist "%cd%\profile" (
|
||||||
set USERPROFILE=%cd%\profile
|
set USERPROFILE=%cd%\profile
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
cp sd-ui-files/scripts/on_env_start.sh scripts/
|
#cp sd-ui-files/scripts/on_env_start.sh scripts/
|
||||||
cp sd-ui-files/scripts/bootstrap.sh scripts/
|
#cp sd-ui-files/scripts/bootstrap.sh scripts/
|
||||||
|
|
||||||
# activate the installer env
|
# activate the installer env
|
||||||
CONDA_BASEPATH=$(conda info --base)
|
CONDA_BASEPATH=$(conda info --base)
|
||||||
|
@ -113,6 +113,7 @@ def device_init(device_selection=None):
|
|||||||
return
|
return
|
||||||
if not torch.cuda.is_available():
|
if not torch.cuda.is_available():
|
||||||
print('WARNING: torch.cuda is not available. Using the CPU, but this will be very slow!')
|
print('WARNING: torch.cuda is not available. Using the CPU, but this will be very slow!')
|
||||||
|
thread_data.device = 'cpu'
|
||||||
return
|
return
|
||||||
device_count = torch.cuda.device_count()
|
device_count = torch.cuda.device_count()
|
||||||
if device_count <= 1 and device_selection == 'auto':
|
if device_count <= 1 and device_selection == 'auto':
|
||||||
|
Loading…
Reference in New Issue
Block a user