Faceswaplab Failed to be loaded on SD.Next #204

Open
opened 2025-03-24 17:13:17 +01:00 by dannypeanuts · 2 comments
dannypeanuts commented 2025-03-24 17:13:17 +01:00 (Migrated from github.com)

Tried to install Faceswaplab on SD.Next UI, but it failed to load on my PC. However last month I successfully installed on another PC. This time it failed. I am running latest SD.Next clone with RTX3060 graphic card on Python 3.12.9.

Image
Image

Tried on ForgeUI and Automatic1111 all failed to load as well. Not sure if this issue is related to the following issue?
#197

Tried to install Faceswaplab on SD.Next UI, but it failed to load on my PC. However last month I successfully installed on another PC. This time it failed. I am running latest SD.Next clone with RTX3060 graphic card on Python 3.12.9. ![Image](https://github.com/user-attachments/assets/8261ce76-3bb4-40b8-8699-e2212fc1fea1) ![Image](https://github.com/user-attachments/assets/ed77a93f-5532-4230-8ab4-7cf65d65e8a8) Tried on ForgeUI and Automatic1111 all failed to load as well. Not sure if this issue is related to the following issue? #197
subtlecaffeine commented 2025-04-06 04:41:33 +02:00 (Migrated from github.com)

I was originally wrong because the venv is something I'm not used to.

The version of albumentations I had in venv was 2.0.5 or something. This was said to be not stable. It was recommended I downgrade to 1.4.3.

pip install "albumentations==1.4.3"

Although for full disclosure I will state I hadn't source venv/bin/activate and didn't realize I was on pydantic<2. So I actually upgraded it to >2 with albumentations==1.4.3. I then backed pydantic back down to the original version. But the main change was albumentations==1.4.3.

The problem you mentioned I think is due to different gradio versions.

python: 3.10.16  •  torch: 2.1.2+cu121  •  xformers: 0.0.23.post1  •  gradio: 3.41.2

is what my footer reports and this version seems to work. At the very least it loads and doesn't produce any breaking errors. I still need to figure out how to use it.

I was originally wrong because the venv is something I'm not used to. The version of albumentations I had in venv was 2.0.5 or something. This was said to be not stable. It was recommended I downgrade to 1.4.3. `pip install "albumentations==1.4.3"` Although for full disclosure I will state I hadn't `source venv/bin/activate` and didn't realize I was on pydantic<2. So I actually upgraded it to >2 with albumentations==1.4.3. I then backed pydantic back down to the original version. But the main change was albumentations==1.4.3. The problem you mentioned I think is due to different gradio versions. ` python: 3.10.16  •  torch: 2.1.2+cu121  •  xformers: 0.0.23.post1  •  gradio: 3.41.2` is what my footer reports and this version seems to work. At the very least it loads and doesn't produce any breaking errors. I still need to figure out how to use it.
subtlecaffeine commented 2025-04-06 18:35:02 +02:00 (Migrated from github.com)

Additionally, this will fix using this in the inpainting tab:

stable-diffusion-webui/extensions/sd-webui-faceswaplab/scripts/faceswaplab_utils/imgutils.py

Remove existing line 24 and replace with this. Watch the indentation.

        if p.overlay_images and batch_index < len(p.overlay_images):
               selected_overlay = p.overlay_images[batch_index]
               img, _ = processing.apply_overlay(img, p.paste_to, selected_overlay)
        else:
               return img
               logger.debug("No overlay selected or overlay list is empty.")
Additionally, this will fix using this in the inpainting tab: `stable-diffusion-webui/extensions/sd-webui-faceswaplab/scripts/faceswaplab_utils/imgutils.py` Remove existing line 24 and replace with this. Watch the indentation. ``` if p.overlay_images and batch_index < len(p.overlay_images): selected_overlay = p.overlay_images[batch_index] img, _ = processing.apply_overlay(img, p.paste_to, selected_overlay) else: return img logger.debug("No overlay selected or overlay list is empty.") ```
Sign in to join this conversation.