Skip to content

Conversation

zRzRzRzRzRzRzR
Copy link
Contributor

Use CogView4 Models one

`Tuple[torch.Tensor, int]`: A tuple where the first element is the timestep schedule from the scheduler and the
second element is the number of inference steps.
"""
accepts_timesteps = "timesteps" in set(inspect.signature(scheduler.set_timesteps).parameters.keys())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's update the # Copied from comment to point to CogView4 pipeline file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that how I understand it?



# Copied from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.retrieve_timesteps
# Copied from diffusers.pipelines.cogview4.pipeline_cogview4.retrieve_timesteps
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the change here is correct @zRzRzRzRzRzRzR

`Tuple[torch.Tensor, int]`: A tuple where the first element is the timestep schedule from the scheduler and the
second element is the number of inference steps.
"""
# Copied from diffusers.pipelines.cogview4.pipeline_cogview4.retrieve_timesteps
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Copied from diffusers.pipelines.cogview4.pipeline_cogview4.retrieve_timesteps

This is not needed. Please also run make fix-copies after removing this to ensure that both the implementation in this file and in pipeline_cogview4.py is the same 🤗

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have completed the verification, running make fix-copies did not produce any errors or other improvement suggestions

@zRzRzRzRzRzRzR
Copy link
Contributor Author

I have completed the modification. @a-r-r-o-w can check if there are any other places that need to be modified.

Comment on lines 536 to 537
Examples:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zRzRzRzRzRzRzR These should not be removed, otherwise the tests will fail: https://github.com/huggingface/diffusers/actions/runs/14009637640/job/39228136089?pr=11125#step:15:64

Let's add this back and we should be good to merge

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@a-r-r-o-w
Copy link
Contributor

@bot /style

Copy link
Contributor

Style fixes have been applied. View the workflow run here.

@a-r-r-o-w a-r-r-o-w merged commit 1d37f42 into huggingface:main Mar 23, 2025
@zRzRzRzRzRzRzR zRzRzRzRzRzRzR deleted the cogview4_control branch August 14, 2025 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants