@@ -357,7 +357,7 @@ def encode_prompt(
357357 def prepare_extra_step_kwargs (self , generator , eta ):
358358 # prepare extra kwargs for the scheduler step, since not all schedulers have the same signature
359359 # eta (η) is only used with the DDIMScheduler, it will be ignored for other schedulers.
360- # eta corresponds to η in DDIM paper: https://arxiv.org/abs /2010.02502
360+ # eta corresponds to η in DDIM paper: https://huggingface.co/papers /2010.02502
361361 # and should be between [0, 1]
362362
363363 accepts_eta = "eta" in set (inspect .signature (self .scheduler .step ).parameters .keys ())
@@ -470,14 +470,12 @@ def _clean_caption(self, caption):
470470 caption = re .sub ("<person>" , "person" , caption )
471471 # urls:
472472 caption = re .sub (
473- r"\b((?:https?:(?:\/{1,3}|[a-zA-Z0-9%])|[a-zA-Z0-9.\-]+[.](?:com|co|ru|net|org|edu|gov|it)[\w/-]*\b\/?(?!@)))" ,
474- # noqa
473+ r"\b((?:https?:(?:\/{1,3}|[a-zA-Z0-9%])|[a-zA-Z0-9.\-]+[.](?:com|co|ru|net|org|edu|gov|it)[\w/-]*\b\/?(?!@)))" , # noqa
475474 "" ,
476475 caption ,
477476 ) # regex for urls
478477 caption = re .sub (
479- r"\b((?:www:(?:\/{1,3}|[a-zA-Z0-9%])|[a-zA-Z0-9.\-]+[.](?:com|co|ru|net|org|edu|gov|it)[\w/-]*\b\/?(?!@)))" ,
480- # noqa
478+ r"\b((?:www:(?:\/{1,3}|[a-zA-Z0-9%])|[a-zA-Z0-9.\-]+[.](?:com|co|ru|net|org|edu|gov|it)[\w/-]*\b\/?(?!@)))" , # noqa
481479 "" ,
482480 caption ,
483481 ) # regex for urls
@@ -505,8 +503,7 @@ def _clean_caption(self, caption):
505503
506504 # все виды тире / all types of dash --> "-"
507505 caption = re .sub (
508- r"[\u002D\u058A\u05BE\u1400\u1806\u2010-\u2015\u2E17\u2E1A\u2E3A\u2E3B\u2E40\u301C\u3030\u30A0\uFE31\uFE32\uFE58\uFE63\uFF0D]+" ,
509- # noqa
506+ r"[\u002D\u058A\u05BE\u1400\u1806\u2010-\u2015\u2E17\u2E1A\u2E3A\u2E3B\u2E40\u301C\u3030\u30A0\uFE31\uFE32\uFE58\uFE63\uFF0D]+" , # noqa
510507 "-" ,
511508 caption ,
512509 )
0 commit comments