tolgacangoz
commited on
Upload matryoshka.py
Browse files- matryoshka.py +12 -12
matryoshka.py
CHANGED
@@ -3802,18 +3802,18 @@ class MatryoshkaPipeline(
|
|
3802 |
new_config["steps_offset"] = 1
|
3803 |
scheduler._internal_dict = FrozenDict(new_config)
|
3804 |
|
3805 |
-
if hasattr(scheduler.config, "clip_sample") and scheduler.config.clip_sample is True:
|
3806 |
-
|
3807 |
-
|
3808 |
-
|
3809 |
-
|
3810 |
-
|
3811 |
-
|
3812 |
-
|
3813 |
-
|
3814 |
-
|
3815 |
-
|
3816 |
-
|
3817 |
|
3818 |
is_unet_version_less_0_9_0 = hasattr(unet.config, "_diffusers_version") and version.parse(
|
3819 |
version.parse(unet.config._diffusers_version).base_version
|
|
|
3802 |
new_config["steps_offset"] = 1
|
3803 |
scheduler._internal_dict = FrozenDict(new_config)
|
3804 |
|
3805 |
+
# if hasattr(scheduler.config, "clip_sample") and scheduler.config.clip_sample is True:
|
3806 |
+
# deprecation_message = (
|
3807 |
+
# f"The configuration file of this scheduler: {scheduler} has not set the configuration `clip_sample`."
|
3808 |
+
# " `clip_sample` should be set to False in the configuration file. Please make sure to update the"
|
3809 |
+
# " config accordingly as not setting `clip_sample` in the config might lead to incorrect results in"
|
3810 |
+
# " future versions. If you have downloaded this checkpoint from the Hugging Face Hub, it would be very"
|
3811 |
+
# " nice if you could open a Pull request for the `scheduler/scheduler_config.json` file"
|
3812 |
+
# )
|
3813 |
+
# deprecate("clip_sample not set", "1.0.0", deprecation_message, standard_warn=False)
|
3814 |
+
# new_config = dict(scheduler.config)
|
3815 |
+
# new_config["clip_sample"] = False
|
3816 |
+
# scheduler._internal_dict = FrozenDict(new_config)
|
3817 |
|
3818 |
is_unet_version_less_0_9_0 = hasattr(unet.config, "_diffusers_version") and version.parse(
|
3819 |
version.parse(unet.config._diffusers_version).base_version
|