hxngiee / DiffFace

DiffFace: Diffusion-based Face Swapping with Facial Guidance
Other
275 stars 17 forks source link

AttributeError: 'PosixPath' object has no attribute 'with_stem' #23

Open qym77 opened 3 months ago

qym77 commented 3 months ago

Traceback (most recent call last): File "main.py", line 7, in image_editor.edit_image_by_prompt() File "/root/DiffFace/optimization/image_editor.py", line 393, in edit_image_by_prompt visualization_path = visualization_path.with_stem(f"{visualization_path.stem}i{iteration_number}b{0}") AttributeError: 'PosixPath' object has no attribute 'with_stem'

seinfinity commented 3 months ago

Traceback (most recent call last): File "main.py", line 7, in image_editor.edit_image_by_prompt() File "/root/DiffFace/optimization/image_editor.py", line 393, in edit_image_by_prompt visualization_path = visualization_path.with_stem(f"{visualization_path.stem}i{iteration_number}b{0}") AttributeError: 'PosixPath' object has no attribute 'with_stem'

I changed with_stem to with_name on line 393 in the image_editor.py file, and it worked!