Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,8 @@ resolutions = ["1024 1024","1280 768","1344 768","768 1344","768 1280"]
|
|
11 |
# Ng
|
12 |
default_negative_prompt= "Logo,Ugly,Morbid,Extra fingers,Poorly drawn hands,Mutation,Blurry,Extra limbs,Gross proportions,Missing arms,Mutated hands,Long neck,Duplicate,Mutilated,Mutilated hands,Poorly drawn face,Deformed,Bad anatomy,Cloned face,Malformed limbs,Missing legs,Too many fingers"
|
13 |
|
14 |
-
|
|
|
15 |
pipe.to(device="cuda")
|
16 |
|
17 |
@spaces.GPU(enable_queue=True)
|
@@ -53,11 +54,11 @@ css = """
|
|
53 |
"""
|
54 |
with gr.Blocks(css=css) as demo:
|
55 |
with gr.Column(elem_id="col-container"):
|
56 |
-
gr.Markdown("## BRIA 3.
|
57 |
gr.HTML('''
|
58 |
<p style="margin-bottom: 10px; font-size: 94%">
|
59 |
This is a demo for
|
60 |
-
<a href="https://huggingface.co/briaai/BRIA-3.
|
61 |
is our new text-to-image model that achieves high-quality generation while being trained exclusively on fully licensed data. We offer both API access and direct access to the model weights, making integration seamless for developers. </p>
|
62 |
''')
|
63 |
with gr.Group():
|
@@ -67,7 +68,7 @@ is our new text-to-image model that achieves high-quality generation while being
|
|
67 |
seed = gr.Textbox(label="Seed", value=-1)
|
68 |
negative_prompt = gr.Textbox(label="Negative Prompt", value=default_negative_prompt)
|
69 |
submit_btn = gr.Button("Generate")
|
70 |
-
result = gr.Image(label="BRIA-3.
|
71 |
|
72 |
# gr.Examples(
|
73 |
# examples = [
|
|
|
11 |
# Ng
|
12 |
default_negative_prompt= "Logo,Ugly,Morbid,Extra fingers,Poorly drawn hands,Mutation,Blurry,Extra limbs,Gross proportions,Missing arms,Mutated hands,Long neck,Duplicate,Mutilated,Mutilated hands,Poorly drawn face,Deformed,Bad anatomy,Cloned face,Malformed limbs,Missing legs,Too many fingers"
|
13 |
|
14 |
+
transformer = BriaTransformer2DModel.from_pretrained("briaai/BRIA-3.2",subfolder='transformer',torch_dtype=torch.bfloat16)
|
15 |
+
pipe = BriaPipeline.from_pretrained("briaai/BRIA-3.1", transformer=transformer, torch_dtype=torch.bfloat16,trust_remote_code=True)
|
16 |
pipe.to(device="cuda")
|
17 |
|
18 |
@spaces.GPU(enable_queue=True)
|
|
|
54 |
"""
|
55 |
with gr.Blocks(css=css) as demo:
|
56 |
with gr.Column(elem_id="col-container"):
|
57 |
+
gr.Markdown("## BRIA 3.2")
|
58 |
gr.HTML('''
|
59 |
<p style="margin-bottom: 10px; font-size: 94%">
|
60 |
This is a demo for
|
61 |
+
<a href="https://huggingface.co/briaai/BRIA-3.2" target="_blank">BRIA 3.2 text-to-image </a>.
|
62 |
is our new text-to-image model that achieves high-quality generation while being trained exclusively on fully licensed data. We offer both API access and direct access to the model weights, making integration seamless for developers. </p>
|
63 |
''')
|
64 |
with gr.Group():
|
|
|
68 |
seed = gr.Textbox(label="Seed", value=-1)
|
69 |
negative_prompt = gr.Textbox(label="Negative Prompt", value=default_negative_prompt)
|
70 |
submit_btn = gr.Button("Generate")
|
71 |
+
result = gr.Image(label="BRIA-3.2 Result")
|
72 |
|
73 |
# gr.Examples(
|
74 |
# examples = [
|