-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Bria 3 2 pipeline #12010
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
base: main
Are you sure you want to change the base?
Bria 3 2 pipeline #12010
Changes from 21 commits
00dfe98
7808ee0
c58267e
4208a09
7c1cf7e
92671ab
649767f
be29631
eb1a3f4
88c8e42
6cefe44
770e162
f27d122
f48d072
e7b6db5
7091624
7b4b8d1
a423221
63c9078
6f656e7
1af2dc0
5bfd733
081ac14
83e3f3a
d2fba0a
a121f58
3890979
d7dd8b3
4dd04ba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!--Copyright 2025 The HuggingFace Team. All rights reserved. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations under the License. | ||
--> | ||
|
||
# BriaTransformer2DModel | ||
|
||
A modified flux Transformer model from [Bria](https://huggingface.co/briaai/BRIA-3.2) | ||
|
||
## BriaTransformer2DModel | ||
|
||
[[autodoc]] BriaTransformer2DModel |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<!--Copyright 2025 The HuggingFace Team. All rights reserved. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations under the License. | ||
--> | ||
|
||
# Bria 3.2 | ||
|
||
Bria 3.2 is the next-generation commercial-ready text-to-image model. With just 4 billion parameters, it provides exceptional aesthetics and text rendering, evaluated to provide on par results to leading open-source models, and outperforming other licensed models. | ||
In addition to being built entirely on licensed data, 3.2 provides several advantages for enterprise and commercial use: | ||
|
||
- Efficient Compute - the model is X3 smaller than the equivalent models in the market (4B parameters vs 12B parameters other open source models) | ||
- Architecture Consistency: Same architecture as 3.1—ideal for users looking to upgrade without disruption. | ||
- Fine-tuning Speedup: 2x faster fine-tuning on L40S and A100. | ||
|
||
Original model checkpoints for Bria 3.2 can be found [here](https://huggingface.co/briaai/BRIA-3.2). | ||
Github repo for Bria 3.2 can be found [here](https://github.com/briaai/BRIA-3.2). | ||
|
||
If you want to learn more about the Bria platform, and get free traril access, please visit [bria.ai](https://bria.ai). | ||
|
||
|
||
## Inference | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, I think we can remove this subsection entirely. The inference example will directly be rendered from the pipeline when autodoc creates the diffusers docs There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Personally I don't think this is a good idea for gated repos, first time users or people not familiar with them will get an error while expecting to work which is not a good user experience. Not strongly opinioned about this so if you think is not necessary I'm fine with it. |
||
|
||
|
||
```python | ||
import torch | ||
from diffusers import BriaPipeline | ||
|
||
pipe = BriaPipeline.from_pretrained("briaai/BRIA-3.2",revision="bria_3_2_diffusers", torch_dtype=torch.bfloat16) | ||
galbria marked this conversation as resolved.
Show resolved
Hide resolved
|
||
pipe.enable_model_cpu_offload() | ||
|
||
prompt = "A high-fashion close-up portrait of a blonde woman in clear sunglasses. The image uses a bold teal and red color split for dramatic lighting. The background is a simple teal-green. The photo is sharp and well-composed, and is designed for viewing with anaglyph 3D glasses for optimal effect. It looks professionally done." | ||
|
||
image = pipe(prompt).images[0] | ||
image.save("bria.png") | ||
``` | ||
|
||
|
||
## BriaPipeline | ||
|
||
[[autodoc]] BriaPipeline | ||
- all | ||
- __call__ | ||
|
Uh oh!
There was an error while loading. Please reload this page.