Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core] enable lora for sdxl controlnets too and add slow tests. #4666

Merged
merged 3 commits into from
Aug 22, 2023

Conversation

sayakpaul
Copy link
Member

@sayakpaul sayakpaul commented Aug 18, 2023

Fixes #4664.

Additionally, adds SLOW tests for SDXL ControlNets.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Aug 18, 2023

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

@sayakpaul sayakpaul changed the title [Core] enable lora for sdxl controlnets too. [Core] enable lora for sdxl controlnets too and add slow tests. Aug 18, 2023
@sayakpaul sayakpaul requested review from DN6 and williamberman August 18, 2023 04:55
@sayakpaul sayakpaul marked this pull request as ready for review August 18, 2023 05:11
pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
"stabilityai/stable-diffusion-xl-base-1.0", controlnet=controlnet
)
pipe.enable_sequential_cpu_offload()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just a question. Is there are difference between enable_model_cpu_offload and enable_sequential_cpu_offload? Is one preferred over the other?

Copy link
Member Author

Choose a reason for hiding this comment

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

Would suggest checking out the doc here:

def enable_sequential_cpu_offload(self, gpu_id: int = 0, device: Union[torch.device, str] = "cuda"):

Copy link
Contributor

@williamberman williamberman left a comment

Choose a reason for hiding this comment

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

nice!

@sayakpaul sayakpaul merged commit 9141c1f into main Aug 22, 2023
@sayakpaul sayakpaul deleted the lora-sdxl-controlnet branch August 22, 2023 01:43
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
…ingface#4666)

* enable lora for sdxl controlnets too.

* add: tests

* fix: assertion values.
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
…ingface#4666)

* enable lora for sdxl controlnets too.

* add: tests

* fix: assertion values.
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.

Lora loading for SDXL works on StableDiffusionXLPipeline but not on StablediffusionXLPipeline
4 participants