Skip to content

Conversation

@anton-l
Copy link
Member

@anton-l anton-l commented Dec 19, 2022

No description provided.

)

pipeline = UnCLIPPipeline.from_pretrained("kakaobrain/karlo-v1-alpha")
pipeline = UnCLIPPipeline.from_pretrained("kakaobrain/karlo-v1-alpha", torch_dtype=torch.float16)
Copy link
Member Author

Choose a reason for hiding this comment

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

No more OOMs on main for this test :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Very nice :-) Thanks a lot!

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Dec 19, 2022

The documentation is not available anymore as the PR was closed or merged.

assert image.shape == (256, 256, 3)
assert np.abs(expected_image - image).max() < 1e-2

def test_stable_diffusion_pipeline_with_sequential_cpu_offloading(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

very cool!


device = torch.device(f"cuda:{gpu_id}")

# TODO: self.prior.post_process_latents is not covered by the offload hooks, so it fails if added to the list
Copy link
Contributor

Choose a reason for hiding this comment

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

I had this problem with the safety checker as well I think. Totally fine as is!

Copy link
Contributor

@patrickvonplaten patrickvonplaten left a comment

Choose a reason for hiding this comment

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

Super cool :-)

Copy link
Member

@pcuenca pcuenca left a comment

Choose a reason for hiding this comment

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

Awesome!

@anton-l anton-l merged commit c7b4acf into main Dec 19, 2022
@anton-l anton-l deleted the unclip-cpu-offload branch December 19, 2022 13:44
sliard pushed a commit to sliard/diffusers that referenced this pull request Dec 21, 2022
* Add CPU offloading to UnCLIP

* use fp32 for testing the offload
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
* Add CPU offloading to UnCLIP

* use fp32 for testing the offload
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