mirror of
https://github.com/karl0ss/comfy_fm24_newgens.git
synced 2025-04-29 04:13:40 +01:00
Update remove_bg.py
only remove non png images
This commit is contained in:
parent
a222f3e14b
commit
03f31859f1
@ -45,7 +45,7 @@ def process_directory(directory):
|
||||
with tqdm(total=total_files, desc="Processing images", unit="image") as pbar:
|
||||
for subdir, dirs, files in os.walk(directory):
|
||||
for file in files:
|
||||
if file.lower().endswith(('.jpg', '.jpeg', 'png')):
|
||||
if file.lower().endswith(('.jpg', '.jpeg')):
|
||||
input_path = os.path.join(subdir, file)
|
||||
output_filename = os.path.splitext(file)[0] + '.png'
|
||||
output_path = os.path.join(subdir, output_filename)
|
||||
|
Loading…
x
Reference in New Issue
Block a user