Skip to content

[LoRA] support non-diffusers hidream loras - #11532

Merged
sayakpaul merged 3 commits into
mainfrom
hidream-non-diffusers-lora
May 9, 2025
Merged

[LoRA] support non-diffusers hidream loras#11532
sayakpaul merged 3 commits into
mainfrom
hidream-non-diffusers-lora

Conversation

@sayakpaul

Copy link
Copy Markdown
Member

What does this PR do?

Fixes: #11383

To check:

fromdiffusersimportDiffusionPipelinefromtransformersimportPreTrainedTokenizerFast, LlamaForCausalLMimporttorchrepo_id="HiDream-ai/HiDream-I1-Full"tokenizer_4=PreTrainedTokenizerFast.from_pretrained("meta-llama/Meta-Llama-3.1-8B-Instruct")
text_encoder_4=LlamaForCausalLM.from_pretrained(
"meta-llama/Meta-Llama-3.1-8B-Instruct",
output_hidden_states=True,
output_attentions=True,
torch_dtype=torch.bfloat16,
)
pipeline=DiffusionPipeline.from_pretrained(
repo_id, tokenizer_4=tokenizer_4,
text_encoder_4=text_encoder_4,
torch_dtype=torch.bfloat16
).to("cuda")
pipeline.load_lora_weights("sayakpaul/different-lora-from-civitai", weight_name="486_hidream.safetensors")

Cc: @vladmandic

@sayakpaul
sayakpaul requested a review from a-r-r-o-wMay 9, 2025 05:36
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

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-wa-r-r-o-w left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks!

@sayakpaul
sayakpaul merged commit 0c47c95 into mainMay 9, 2025
@DN6DN6 added the roadmap Add to current release roadmap label Jun 5, 2025
@DN6DN6 moved this from In Progress to Done in Diffusers RoadmapJun 5, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

roadmapAdd to current release roadmap

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

HiDream LoRA support

4 participants

@sayakpaul@HuggingFaceDocBuilderDev@a-r-r-o-w@DN6