Gourieff / sd-webui-reactor

Fast and Simple Face Swap Extension for StableDiffusion WebUI (A1111 SD WebUI, SD WebUI Forge, SD.Next, Cagliostro)
GNU Affero General Public License v3.0
2.3k stars 245 forks source link

Face Model selection (still) broken #469

Open genialgenteel opened 1 week ago

genialgenteel commented 1 week ago

First, confirm

What happened?

Hello!

In my ui-config.json, I configured ReActor to always start up on the Face Model section and to have a model prefilled in and selected. This has never worked though for as long as I've had ReActor, and I'm just now reporting it.

Instead of the expected behavior, upon starting up A1111, ReActor shows the Image(s) tab's contents.

What I'm expecting upon startup: image

What I get upon startup: image

After clicking to the actual Image(s) tab and then back to the Face Model tab, Face Model shows up correctly, but it still doesn't have the model I preselected in ui-config.json already selected. image

There was a similar issue (maybe the same thing, maybe not) here, but the OP said his magically got fixed somehow, but mine has not worked right ever. I've tried fresh installing on both vanilla A1111 and Forge as well as resetting the ui-config.json. Nothing.

Help please! Thanks!

Steps to reproduce the problem

  1. Edit ui-config.json on the following lines:

    "customscript/reactor_faceswap.py/txt2img/Select Source/visible": true,
    "customscript/reactor_faceswap.py/txt2img/Select Source/value": "Face Model",
    "txt2img/Face Model Name/visible": true,
    "txt2img/Face Model Name/value": "MODELNAME.safetensors",
  2. Load up A1111 / Forge

  3. Click dropdown for ReActor

  4. See which tab is active v.s. what options are showing

Sysinfo

{
    "Platform": "Windows-10-10.0.22631-SP0",
    "Python": "3.10.6",
    "Version": "f0.0.17v1.8.0rc-latest-276-g29be1da7",
    "Commit": "29be1da7cf2b5dccfc70fbdd33eb35c56a31ffb7",
    "Script path": "C:\\Users\\USERNAME\\Pictures\\sd.webui\\webui",
    "Data path": "C:\\Users\\USERNAME\\Pictures\\sd.webui\\webui",
    "Extensions dir": "C:\\Users\\USERNAME\\Pictures\\sd.webui\\webui\\extensions",
    "Checksum": "67ee313b2ff7c14bf6bd2d860f1697c11b83bad3d83c32f43b04ed087160c7f3",

See attached sysinfo - Copy.txt for details

Relevant console log

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: f0.0.17v1.8.0rc-latest-276-g29be1da7
Commit hash: 29be1da7cf2b5dccfc70fbdd33eb35c56a31ffb7
CUDA 12.1
Launching Web UI with arguments: --enable-insecure-extension-access --listen --port XXXX --xformers --upcast-sampling --disable-safe-unpickle --theme dark --no-hashing
Total VRAM 8192 MB, total RAM 16069 MB
WARNING:xformers:A matching Triton is not available, some optimizations will not be enabled.
Error caught was: No module named 'triton'
xformers version: 0.0.23.post1
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3070 Ti Laptop GPU : native
Hint: your device supports --pin-shared-memory for potential speed improvements.
Hint: your device supports --cuda-malloc for potential speed improvements.
Hint: your device supports --cuda-stream for potential speed improvements.
VAE dtype: torch.bfloat16
CUDA Stream Activated:  False
Using xformers cross attention
ControlNet preprocessor location: C:\Users\USERNAME\Pictures\sd.webui\webui\models\ControlNetPreprocessor
11:30:36 - ReActor - STATUS - Running v0.7.0-b7 on Device: CPU
Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu.
[-] ADetailer initialized. version: 24.6.0, num models: 14
2024-06-22 11:30:37,679 - AnimateDiff - INFO - AnimateDiff Hooking i2i_batch
Loading weights [None] from C:\Users\USERNAME\Pictures\sd.webui\webui\models\Stable-diffusion\SD15\MODELNAME.safetensors
model_type EPS
UNet ADM Dimension 0
Using xformers attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using xformers attention in VAE
Leftover VAE keys ['encoder.mid.attn_1.to_k.bias', 'encoder.mid.attn_1.to_k.weight', 'encoder.mid.attn_1.to_out.0.bias', 'encoder.mid.attn_1.to_out.0.weight', 'encoder.mid.attn_1.to_q.bias', 'encoder.mid.attn_1.to_q.weight', 'encoder.mid.attn_1.to_v.bias', 'encoder.mid.attn_1.to_v.weight', 'decoder.mid.attn_1.to_k.bias', 'decoder.mid.attn_1.to_k.weight', 'decoder.mid.attn_1.to_out.0.bias', 'decoder.mid.attn_1.to_out.0.weight', 'decoder.mid.attn_1.to_q.bias', 'decoder.mid.attn_1.to_q.weight', 'decoder.mid.attn_1.to_v.bias', 'decoder.mid.attn_1.to_v.weight']
extra {'cond_stage_model.clip_l.text_projection', 'cond_stage_model.clip_l.logit_scale'}
left over keys: dict_keys(['model_ema.decay', 'model_ema.num_updates'])
loaded straight to GPU
To load target model BaseModel
Begin to load 1 model
[Memory Management] Current Free GPU Memory (MB) =  5422.03662109375
[Memory Management] Model Memory (MB) =  0.00762939453125
[Memory Management] Minimal Inference Memory (MB) =  1024.0
[Memory Management] Estimated Remaining GPU Memory (MB) =  4398.028991699219
Moving model(s) has taken 0.01 seconds
To load target model SD1ClipModel
Begin to load 1 model
[Memory Management] Current Free GPU Memory (MB) =  5421.98388671875
[Memory Management] Model Memory (MB) =  454.2076225280762
[Memory Management] Minimal Inference Memory (MB) =  1024.0
[Memory Management] Estimated Remaining GPU Memory (MB) =  3943.776264190674
Moving model(s) has taken 0.17 seconds
Model loaded in 3.8s (load weights from disk: 0.1s, forge load real models: 3.2s, load VAE: 0.2s, calculate empty prompt: 0.3s).
2024-06-22 11:30:41,750 - ControlNet - INFO - ControlNet UI callback registered.
Running on local URL:  http://0.0.0.0:XXXX

To create a public link, set `share=True` in `launch()`.
Startup time: 21.7s (prepare environment: 4.4s, import torch: 3.2s, import gradio: 0.9s, setup paths: 0.5s, initialize shared: 0.1s, other imports: 0.6s, load scripts: 3.1s, create ui: 4.3s, gradio launch: 4.4s).

Additional information

I use Firefox as my browser.

Woisek commented 1 week ago

I guess this more a problem of Gradio and how tabs work (click event). But maybe there is a solution to it ...