NokiMo
Furkan Gözükara
Furkan Gözükara

patreon


Shopify / Background Replacement, 1-Click installers for Windows, RunPod, Massed Compute and Kaggle - This App is for replacing background of anything such as Product Images

Patreon exclusive posts index to find our scripts easily, Patreon scripts updates history to see which updates arrived to which scripts and amazing Patreon special generative scripts list that you can use in any of your task.

Join discord to get help, chat, discuss and also tell me your discord username to get your special rank : SECourses Discord

Please also Star, Watch and Fork our Stable Diffusion & Generative AI  GitHub repository and join our Reddit subreddit and follow me on LinkedIn (my real profile)

=======

Latest installers zip file : shopify_v6.zip

24 April 2025 Update

Windows Requirements

16 November 2024 Update:

Installation:

How To Install and Use:

This app is for replacing background of anything, especially for products

Windows:

Massed Compute (Recommend Cloud) :

RunPod (Cloud):

Shopify / Background Replacement, 1-Click installers for Windows, RunPod, Massed Compute and Kaggle - This App is for replacing background of anything such as Product Images Shopify / Background Replacement, 1-Click installers for Windows, RunPod, Massed Compute and Kaggle - This App is for replacing background of anything such as Product Images Shopify / Background Replacement, 1-Click installers for Windows, RunPod, Massed Compute and Kaggle - This App is for replacing background of anything such as Product Images

Comments

I keep getting the issue: Hugging Face cache folders set to: E:\AI\shopify_v6\background-replacement\models Traceback (most recent call last): File "E:\AI\shopify_v6\background-replacement\app.py", line 2, in import gradio as gr ModuleNotFoundError: No module named 'gradio' Press any key to continue . . .

Steven Lee

I run into an issue where if I use the windows installer "Windows_Install.bat" file. The requirements.txt is from a conda environment therefore it does not get installed. How must this file be modified so that the necessary packages get installed in the venv?

Steven Lee

yes using kaggle has so many disadvantageous

Furkan Gözükara

see, the ngrok GUI cannot easily come out,

huiminh ding

no, thanks

huiminh ding

well you need custom code for that. i dont know how to do from cmd. you need to hire a programmer for you to code. if you got a good budget i may code

Furkan Gözükara

Can I do batch replacements in the command line without a GUI interface, and what is the code?

huiminh ding

you have cuda error. please follow this video and install cuda 12.4 python 3.10 : https://youtu.be/DrhUHnYfwC0 i use win 11 too

Furkan Gözükara

win 11 error WARNING: Failed to find CUDA. Traceback (most recent call last): File "C:\shopify_v5\background-replacement\venv\lib\site-packages\diffusers\utils\import_utils.py", line 853, in _get_module return importlib.import_module("." + module_name, self.__name__) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "C:\shopify_v5\background-replacement\venv\lib\site-packages\diffusers\loaders\single_file.py", line 24, in from .single_file_utils import ( File "C:\shopify_v5\background-replacement\venv\lib\site-packages\diffusers\loaders\single_file_utils.py", line 28, in from ..models.modeling_utils import load_state_dict File "C:\shopify_v5\background-replacement\venv\lib\site-packages\diffusers\models\modeling_utils.py", line 35, in from ..quantizers import DiffusersAutoQuantizer, DiffusersQuantizer File "C:\shopify_v5\background-replacement\venv\lib\site-packages\diffusers\quantizers\__init__.py", line 15, in from .auto import DiffusersAutoQuantizer File "C:\shopify_v5\background-replacement\venv\lib\site-packages\diffusers\quantizers\auto.py", line 21, in from .bitsandbytes import BnB4BitDiffusersQuantizer, BnB8BitDiffusersQuantizer File "C:\shopify_v5\background-replacement\venv\lib\site-packages\diffusers\quantizers\bitsandbytes\__init__.py", line 2, in from .utils import dequantize_and_replace, dequantize_bnb_weight, replace_with_bnb_linear File "C:\shopify_v5\background-replacement\venv\lib\site-packages\diffusers\quantizers\bitsandbytes\utils.py", line 32, in import bitsandbytes as bnb File "C:\shopify_v5\background-replacement\venv\lib\site-packages\bitsandbytes\__init__.py", line 16, in from .nn import modules File "C:\shopify_v5\background-replacement\venv\lib\site-packages\bitsandbytes\nn\__init__.py", line 17, in from .triton_based_modules import ( File "C:\shopify_v5\background-replacement\venv\lib\site-packages\bitsandbytes\nn\triton_based_modules.py", line 6, in from bitsandbytes.triton.dequantize_rowwise import dequantize_rowwise File "C:\shopify_v5\background-replacement\venv\lib\site-packages\bitsandbytes\triton\dequantize_rowwise.py", line 11, in import triton File "C:\shopify_v5\background-replacement\venv\lib\site-packages\triton\__init__.py", line 20, in from .runtime import ( File "C:\shopify_v5\background-replacement\venv\lib\site-packages\triton\runtime\__init__.py", line 1, in from .autotuner import (Autotuner, Config, Heuristics, autotune, heuristics) File "C:\shopify_v5\background-replacement\venv\lib\site-packages\triton\runtime\autotuner.py", line 9, in from ..testing import do_bench, do_bench_cudagraph File "C:\shopify_v5\background-replacement\venv\lib\site-packages\triton\testing.py", line 7, in from . import language as tl File "C:\shopify_v5\background-replacement\venv\lib\site-packages\triton\language\__init__.py", line 4, in from . import math File "C:\shopify_v5\background-replacement\venv\lib\site-packages\triton\language\math.py", line 1, in from . import core File "C:\shopify_v5\background-replacement\venv\lib\site-packages\triton\language\core.py", line 10, in from ..runtime.jit import jit File "C:\shopify_v5\background-replacement\venv\lib\site-packages\triton\runtime\jit.py", line 12, in from ..runtime.driver import driver File "C:\shopify_v5\background-replacement\venv\lib\site-packages\triton\runtime\driver.py", line 1, in from ..backends import backends File "C:\shopify_v5\background-replacement\venv\lib\site-packages\triton\backends\__init__.py", line 50, in backends = _discover_backends() File "C:\shopify_v5\background-replacement\venv\lib\site-packages\triton\backends\__init__.py", line 43, in _discover_backends compiler = _load_module(name, os.path.join(root, name, 'compiler.py')) File "C:\shopify_v5\background-replacement\venv\lib\site-packages\triton\backends\__init__.py", line 12, in _load_module spec.loader.exec_module(module) File "C:\shopify_v5\background-replacement\venv\lib\site-packages\triton\backends\amd\compiler.py", line 2, in from triton._C.libtriton import ir, passes, llvm, amd ImportError: DLL load failed while importing libtriton: 动态链接库(DLL)初始化例程失败。 The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\shopify_v5\background-replacement\venv\lib\site-packages\diffusers\utils\import_utils.py", line 853, in _get_module return importlib.import_module("." + module_name, self.__name__) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "C:\shopify_v5\background-replacement\venv\lib\site-packages\diffusers\pipelines\controlnet\pipeline_controlnet_sd_xl.py", line 35, in from ...loaders import ( File "", line 1075, in _handle_fromlist File "C:\shopify_v5\background-replacement\venv\lib\site-packages\diffusers\utils\import_utils.py", line 843, in __getattr__ module = self._get_module(self._class_to_module[name]) File "C:\shopify_v5\background-replacement\venv\lib\site-packages\diffusers\utils\import_utils.py", line 855, in _get_module raise RuntimeError( RuntimeError: Failed to import diffusers.loaders.single_file because of the following error (look up to see its traceback): DLL load failed while importing libtriton: 动态链接库(DLL)初始化例程失败。 The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\shopify_v5\background-replacement\app.py", line 3, in from background_replacer import replace_background File "C:\shopify_v5\background-replacement\background_replacer.py", line 18, in from pipeline import init as init_pipeline, run_pipeline File "C:\shopify_v5\background-replacement\pipeline.py", line 3, in from diffusers import StableDiffusionXLControlNetPipeline, ControlNetModel, AutoencoderKL, UniPCMultistepScheduler File "", line 1075, in _handle_fromlist File "C:\shopify_v5\background-replacement\venv\lib\site-packages\diffusers\utils\import_utils.py", line 844, in __getattr__ value = getattr(module, name) File "C:\shopify_v5\background-replacement\venv\lib\site-packages\diffusers\utils\import_utils.py", line 844, in __getattr__ value = getattr(module, name) File "C:\shopify_v5\background-replacement\venv\lib\site-packages\diffusers\utils\import_utils.py", line 843, in __getattr__ module = self._get_module(self._class_to_module[name]) File "C:\shopify_v5\background-replacement\venv\lib\site-packages\diffusers\utils\import_utils.py", line 855, in _get_module raise RuntimeError( RuntimeError: Failed to import diffusers.pipelines.controlnet.pipeline_controlnet_sd_xl because of the following error (look up to see its traceback): Failed to import diffusers.loaders.single_file because of the following error (look up to see its traceback): DLL load failed while importing libtriton: 动态链接库(DLL)初始化例程失败。 请按任意键继续. . .

big dato

yep fixed with newest zip file

Furkan Gözükara

Could I know if the error has been solved on kaggle notebook? Thanks, please let me know.

huiminh ding

thanks a lot

huiminh ding

give me some time i will fix kaggle notebook hopefully

Furkan Gözükara

Do I need virtual environment?

huiminh ding

/kaggle/working/background-replacement Traceback (most recent call last): File "/opt/conda/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1778, in _get_module return importlib.import_module("." + module_name, self.__name__) File "/opt/conda/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/opt/conda/lib/python3.10/site-packages/transformers/pipelines/__init__.py", line 26, in from ..image_processing_utils import BaseImageProcessor File "/opt/conda/lib/python3.10/site-packages/transformers/image_processing_utils.py", line 21, in from .image_transforms import center_crop, normalize, rescale File "/opt/conda/lib/python3.10/site-packages/transformers/image_transforms.py", line 22, in from .image_utils import ( File "/opt/conda/lib/python3.10/site-packages/transformers/image_utils.py", line 58, in from torchvision.transforms import InterpolationMode File "/opt/conda/lib/python3.10/site-packages/torchvision/__init__.py", line 10, in from torchvision import _meta_registrations, datasets, io, models, ops, transforms, utils # usort:skip File "/opt/conda/lib/python3.10/site-packages/torchvision/_meta_registrations.py", line 163, in @torch.library.register_fake("torchvision::nms") AttributeError: module 'torch.library' has no attribute 'register_fake' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/kaggle/working/background-replacement/app.py", line 3, in from background_replacer import replace_background File "/kaggle/working/background-replacement/background_replacer.py", line 14, in from captioner import init as init_captioner, derive_caption File "/kaggle/working/background-replacement/captioner.py", line 1, in from transformers import pipeline File "", line 1075, in _handle_fromlist File "/opt/conda/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1766, in __getattr__ module = self._get_module(self._class_to_module[name]) File "/opt/conda/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1780, in _get_module raise RuntimeError( RuntimeError: Failed to import transformers.pipelines because of the following error (look up to see its traceback): module 'torch.library' has no attribute 'register_fake'

huiminh ding

no this doesnt change product only background

Furkan Gözükara

will this change the product

huiminh ding

thank you very much

Andrea Rotondo

in the pipeline.py. you need to find hugging face repo that includes diffusers files and then you can change : pipe = StableDiffusionXLControlNetPipeline.from_pretrained( i dont know if single safetensors would work but you can try with giving full path. i will try in a moment

Furkan Gözükara

good morning where can i change the SDXL MODEL?

Andrea Rotondo

inside pipeline.py you will see it loads models

Furkan Gözükara

How would I replace the model? I don't see where it's stored / accessed.

Jesse

i never tried but theoretically should work fine. if you try let me know please

Furkan Gözükara

This is very cool. Are we able to change the model to a different SDXL model?

Jesse

sure. make sure that python 3.10.11 is default version set. then do reinstall. also don't forget c++ tools. while installing if you get any error copy entire cmd output and email me monstermmorpg@gmail.com

Furkan Gözükara

ok thanks for letting me know. ill install 3.10

Chloe

hi. sadly 3.11 will not work. please install 3.10.11 and make it default as shown here : https://youtu.be/-NjNy7afOQ0 also install c++ tools and ffmpeg too

Furkan Gözükara

Hi thanks for replying, I am using python 3,11 and just re-installed it on disc C and get this message: Traceback (most recent call last): File "C:\backgroundrpl\background-replacement\app.py", line 2, in import gradio as gr ModuleNotFoundError: No module named 'gradio' Press any key to continue . . .

Chloe

hello. you need to install both python and the background-replacement directly into your drive. e.g. python will be in c:/python310 and background will be in D:/background_replace . no space character or not non english character. i am also testing script right now to verify it is working or not still with a fresh install

Furkan Gözükara

Hi I have a problem running this script: Traceback (most recent call last): File "C:\Users\User\Desktop\backgroundreplacement\background-replacement\app.py", line 3, in from background_replacer import replace_background File "C:\Users\User\Desktop\backgroundreplacement\background-replacement\background_replacer.py", line 25, in init_segmenter() File "C:\Users\User\Desktop\backgroundreplacement\background-replacement\segmenter.py", line 35, in init import data_loader_cache ModuleNotFoundError: No module named 'data_loader_cache' Press any key to continue . . .

Chloe

just fixed and replied you from discord ty

Furkan Gözükara

Traceback (most recent call last): File "D:\pimages\background-replacement\app.py", line 150, in num_inference_steps = gr.Slider(precision=0,minimum=1, maximum=300,value=30, default=30,step=1, label="Num Inference Steps") File "D:\pimages\background-replacement\venv\lib\site-packages\gradio\component_meta.py", line 146, in wrapper return fn(self, **kwargs) TypeError: Slider.__init__() got an unexpected keyword argument 'precision' To continue, press any key. . . help me solve the problem Thank you

PhotoFaceFun

Hello.🤝 Startup problem - Auto Windows Installer For SDXL Background Replacement for Product Images A matching Triton is not available, some optimizations will not be enabled. Error caught was: No module named 'triton' Initializing captioner... Initializing upscaler... Initializing segmenter... Initializing depth estimator... Initializing depth ControlNet... Initializing autoencoder... Initializing SDXL pipeline... Loading pipeline components...: 100%|████████████████████████████████████████████████████| 7/7 [00:08<00:00, 1.26s/it] Traceback (most recent call last): File "D:\pimages\background-replacement\app.py", line 150, in num_inference_steps = gr.Slider(precision=0,minimum=1, maximum=300,value=30, default=30,step=1, label="Num Inference Steps") File "D:\pimages\background-replacement\venv\lib\site-packages\gradio\component_meta.py", line 146, in wrapper return fn(self, **kwargs) TypeError: Slider.init() got an unexpected keyword argument 'precision' To continue, press any key. . .

PhotoFaceFun

Thank you sir. I appreciate your work.

hi mizu

yes here for runpod : https://www.patreon.com/posts/auto-runpod-for-89919157

Furkan Gözükara

Is this possible to run in Runpod or Paperspace?

hi mizu

for example this repo : https://github.com/xuebinqin/DIS

Furkan Gözükara

What open source repos where you referring to?

JS

SECourses: Tutorials, Guides, Resources, Training, MidJourney, Voice Clone, TTS, ChatGPT, GPT, LLM, Scripts by Furkan Gözükara 1w I don't think so you can make. They are using some third party open source repos i never seen.

JS

can you elaborate more because i didn't understand the question.

Furkan Gözükara

Are you referring to the repos that your install.bat and run.bat use, or repos installed by Comfy UI?

JS

please message me from discord and show screenshots. it doesn't show error here.

Furkan Gözükara

I don't think so you can make. They are using some third party open source repos i never seen.

Furkan Gözükara

That's a great tutorial. Do you know how to do this in ComfyUI?

James Sheffield

it stopped there, no more processing, i waited for more than 3 hours, so that turn off cmd window and run it again, but it couldnt run anymore

Andy Le

Initializing captioner... Initializing upscaler... Initializing segmenter... Cloning into 'git\xuebinqin\DIS'... remote: Enumerating objects: 343, done. remote: Counting objects: 100% (109/109), done. remote: Compressing objects: 100% (43/43), done. remote: Total 343 (delta 89), reused 66 (delta 66), pack-reused 234 iB/s Receiving objects: 100% (343/343), 49.63 MiB | 7.90 MiB/s, done. Resolving deltas: 100% (165/165), done.

Andy Le

first i run install.bat after that, i continue to run.bat. it ran in minutes and stop working, screen frozen. i turn off the screen and try to open it again, it said some errors on screen and push me to press any key..its closed. I install python 3.10 and git 2.0 (required to run stable diffsuion Automatic1111 ver 1.6 on my PC)

Andy Le

hello. do you have python and git installed? what version of Python you have? first did you click install . bat file?

Furkan Gözükara

i couldnt start with it. Is is bug in run.bat ?

Andy Le


Related Creators