diff --git a/diffsynth/extensions/ImageQualityMetric/BLIP/med.py b/diffsynth/extensions/ImageQualityMetric/BLIP/med.py index 426f468..5905a34 100644 --- a/diffsynth/extensions/ImageQualityMetric/BLIP/med.py +++ b/diffsynth/extensions/ImageQualityMetric/BLIP/med.py @@ -413,7 +413,7 @@ class BertEncoder(nn.Module): if self.gradient_checkpointing and self.training: if use_cache: - logger.warn( + logger.warning( "`use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`..." ) use_cache = False diff --git a/diffsynth/models/kolors_text_encoder.py b/diffsynth/models/kolors_text_encoder.py index ee785e3..2e92121 100644 --- a/diffsynth/models/kolors_text_encoder.py +++ b/diffsynth/models/kolors_text_encoder.py @@ -1373,7 +1373,7 @@ class ChatGLMForConditionalGeneration(ChatGLMPreTrainedModel): elif generation_config.max_new_tokens is not None: generation_config.max_length = generation_config.max_new_tokens + input_ids_seq_length if not has_default_max_length: - logger.warn( + logger.warning( f"Both `max_new_tokens` (={generation_config.max_new_tokens}) and `max_length`(=" f"{generation_config.max_length}) seem to have been set. `max_new_tokens` will take precedence. " "Please refer to the documentation for more information. "