FIX: AMD/MacM1,2 not launch issue
Issues: #175 #176 #177 VersionUP (0.5.0 beta1) Thanks @darktar for the help in detecting the error
This commit is contained in:
parent
ee742ec43e
commit
4139d167ff
@ -2,7 +2,7 @@
|
||||
|
||||
<img src="https://github.com/Gourieff/Assets/raw/main/sd-webui-reactor/ReActor_logo_red.png?raw=true" alt="logo" width="180px"/>
|
||||
|
||||

|
||||

|
||||
|
||||
<a href='https://ko-fi.com/gourieff' target='_blank'><img height='33' src='https://storage.ko-fi.com/cdn/kofi3.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
<img src="https://github.com/Gourieff/Assets/raw/main/sd-webui-reactor/ReActor_logo_red.png?raw=true" alt="logo" width="180px"/>
|
||||
|
||||

|
||||

|
||||
|
||||
<a href='https://ko-fi.com/gourieff' target='_blank'><img height='33' src='https://storage.ko-fi.com/cdn/kofi3.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
||||
|
||||
|
||||
@ -3,8 +3,9 @@ import gradio as gr
|
||||
from PIL import Image
|
||||
try:
|
||||
import torch.cuda as cuda
|
||||
EP_is_visible = True if cuda.is_available() else False
|
||||
except:
|
||||
cuda = None
|
||||
EP_is_visible = False
|
||||
|
||||
from typing import List
|
||||
|
||||
@ -139,9 +140,7 @@ class FaceSwapScript(scripts.Script):
|
||||
)
|
||||
with gr.Tab("Settings"):
|
||||
models = get_models()
|
||||
if cuda is not None:
|
||||
if cuda.is_available():
|
||||
with gr.Row():
|
||||
with gr.Row(visible=EP_is_visible):
|
||||
device = gr.Radio(
|
||||
label="Execution Provider",
|
||||
choices=DEVICE_LIST,
|
||||
@ -151,17 +150,13 @@ class FaceSwapScript(scripts.Script):
|
||||
scale=2,
|
||||
)
|
||||
save_device_btn = gr.Button("Save", scale=0)
|
||||
save = gr.Markdown("")
|
||||
save = gr.Markdown("", visible=EP_is_visible)
|
||||
setattr(device, "do_not_save_to_config", True)
|
||||
save_device_btn.click(
|
||||
set_Device,
|
||||
inputs=[device],
|
||||
outputs=[save],
|
||||
)
|
||||
else:
|
||||
device = "CPU"
|
||||
else:
|
||||
device = "CPU"
|
||||
with gr.Row():
|
||||
if len(models) == 0:
|
||||
logger.warning(
|
||||
@ -533,8 +528,7 @@ class FaceSwapScriptExtras(scripts_postprocessing.ScriptPostprocessing):
|
||||
)
|
||||
with gr.Tab("Settings"):
|
||||
models = get_models()
|
||||
if cuda.is_available():
|
||||
with gr.Row():
|
||||
with gr.Row(visible=EP_is_visible):
|
||||
device = gr.Radio(
|
||||
label="Execution Provider",
|
||||
choices=DEVICE_LIST,
|
||||
@ -544,15 +538,13 @@ class FaceSwapScriptExtras(scripts_postprocessing.ScriptPostprocessing):
|
||||
scale=2,
|
||||
)
|
||||
save_device_btn = gr.Button("Save", scale=0)
|
||||
save = gr.Markdown("")
|
||||
save = gr.Markdown("", visible=EP_is_visible)
|
||||
setattr(device, "do_not_save_to_config", True)
|
||||
save_device_btn.click(
|
||||
set_Device,
|
||||
inputs=[device],
|
||||
outputs=[save],
|
||||
)
|
||||
else:
|
||||
device = "CPU"
|
||||
with gr.Row():
|
||||
if len(models) == 0:
|
||||
logger.warning(
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
app_title = "ReActor"
|
||||
version_flag = "v0.5.0-a5"
|
||||
version_flag = "v0.5.0-b1"
|
||||
|
||||
from scripts.reactor_logger import logger, get_Run, set_Run
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user