cubiq / ComfyUI_IPAdapter_plus

GNU General Public License v3.0
3.17k stars 238 forks source link

Converted patterns to raw strings #507

Closed madriss closed 2 months ago

madriss commented 2 months ago

So with the latest python version (3.12), we get the following warnings :

/src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:18: SyntaxWarning: invalid escape sequence '.' pattern = '(ViT.bigG.14.39B.b160k|ipadapter.sdxl|sdxl.model.(bin|safetensors))' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:20: SyntaxWarning: invalid escape sequence '.' pattern = '(ViT.H.14.s32B.b79K|ipadapter.sd15|sd1.?5.model.(bin|safetensors))' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:36: SyntaxWarning: invalid escape sequence '.' pattern = 'sd15.light.v11.(safetensors|bin)$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:39: SyntaxWarning: invalid escape sequence '.' pattern = 'sd15.light.(safetensors|bin)$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:42: SyntaxWarning: invalid escape sequence '.' pattern = 'ip.adapter.sdxl.vit.h.(safetensors|bin)$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:44: SyntaxWarning: invalid escape sequence '.' pattern = 'ip.adapter.sd15.(safetensors|bin)$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:47: SyntaxWarning: invalid escape sequence '.' pattern = 'ip.adapter.sdxl.(safetensors|bin)$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:49: SyntaxWarning: invalid escape sequence '.' pattern = 'sd15.vit.g.(safetensors|bin)$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:52: SyntaxWarning: invalid escape sequence '.' pattern = 'plus.sdxl.vit.h.(safetensors|bin)$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:54: SyntaxWarning: invalid escape sequence '.' pattern = 'ip.adapter.plus.sd15.(safetensors|bin)$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:57: SyntaxWarning: invalid escape sequence '.' pattern = 'plus.face.sdxl.vit.h.(safetensors|bin)$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:59: SyntaxWarning: invalid escape sequence '.' pattern = 'plus.face.sd15.(safetensors|bin)$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:63: SyntaxWarning: invalid escape sequence '.' pattern = 'full.face.sd15.(safetensors|bin)$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:66: SyntaxWarning: invalid escape sequence '.' pattern = 'portrait.sdxl.(safetensors|bin)$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:68: SyntaxWarning: invalid escape sequence '.' pattern = 'portrait.v11.sd15.(safetensors|bin)$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:71: SyntaxWarning: invalid escape sequence '.' pattern = 'portrait.sd15.(safetensors|bin)$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:75: SyntaxWarning: invalid escape sequence '.' pattern = 'portrait.sdxl.unnorm.(safetensors|bin)$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:81: SyntaxWarning: invalid escape sequence '.' pattern = 'faceid.sdxl.(safetensors|bin)$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:82: SyntaxWarning: invalid escape sequence '.' lora_pattern = 'faceid.sdxl.lora.safetensors$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:84: SyntaxWarning: invalid escape sequence '.' pattern = 'faceid.sd15.(safetensors|bin)$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:85: SyntaxWarning: invalid escape sequence '.' lora_pattern = 'faceid.sd15.lora.safetensors$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:90: SyntaxWarning: invalid escape sequence '.' pattern = 'faceid.plus.sd15.(safetensors|bin)$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:91: SyntaxWarning: invalid escape sequence '.' lora_pattern = 'faceid.plus.sd15.lora.safetensors$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:95: SyntaxWarning: invalid escape sequence '.' pattern = 'faceid.plusv2.sdxl.(safetensors|bin)$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:96: SyntaxWarning: invalid escape sequence '.' lora_pattern = 'faceid.plusv2.sdxl.lora.safetensors$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:98: SyntaxWarning: invalid escape sequence '.' pattern = 'faceid.plusv2.sd15.(safetensors|bin)$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:99: SyntaxWarning: invalid escape sequence '.' lora_pattern = 'faceid.plusv2.sd15.lora.safetensors$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:104: SyntaxWarning: invalid escape sequence '.' pattern = 'plus.composition.sdxl.safetensors$' /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/utils.py:106: SyntaxWarning: invalid escape sequence '.' pattern = 'plus.composition.sd15.safetensors$'

But a simple solution to that is to use raw strings instead.

This is to avoid having : SyntaxWarning: invalid escape sequence '.' in python 3.12