File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -451,7 +451,7 @@ def prepare_environment():
451451 args .skip_python_version_check = True
452452 elif args .use_zluda :
453453 print ('WARNING: ZLUDA works best with SD.Next. Please consider migrating to SD.Next.' )
454- backend = "cuda "
454+ backend = "zluda "
455455 elif args .use_ipex :
456456 backend = "ipex"
457457 if system == "Windows" :
@@ -489,7 +489,7 @@ def prepare_environment():
489489 if rocm .is_installed :
490490 if system == "Windows" : # ZLUDA
491491 args .use_zluda = True
492- backend = "cuda "
492+ backend = "zluda "
493493 else :
494494 backend = "rocm"
495495 torch_index_url = os .environ .get (
@@ -539,7 +539,7 @@ def prepare_environment():
539539 print (f"Version: { tag } " )
540540 print (f"Commit hash: { commit } " )
541541
542- if args . use_zluda or backend == "rocm" :
542+ if backend in ( "rocm" , "zluda" ,) :
543543 device = None
544544 try :
545545 amd_gpus = rocm .get_agents ()
@@ -612,7 +612,7 @@ def prepare_environment():
612612
613613 if args .skip_torch_cuda_test :
614614 print ("WARNING: you should not skip torch test unless you want CPU to work." )
615- if args .use_ipex or args .use_directml or args .use_zluda or args . use_cpu_torch :
615+ if args .use_ipex or args .use_directml or args .use_cpu_torch :
616616 args .skip_torch_cuda_test = True
617617
618618 if rocm .is_installed :
Original file line number Diff line number Diff line change @@ -71,4 +71,5 @@ def initialize():
7171 from modules .onnx_impl import initialize_onnx
7272 initialize_onnx ()
7373
74- initialize_zluda ()
74+ if devices .backend == "zluda" :
75+ initialize_zluda ()
You can’t perform that action at this time.
0 commit comments