Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,10 +31,6 @@ pipe.scheduler = EulerAncestralDiscreteScheduler(
|
|
| 31 |
pipe.enable_xformers_memory_efficient_attention()
|
| 32 |
pipe.force_zeros_for_empty_prompt = False
|
| 33 |
|
| 34 |
-
from transformers import DPTFeatureExtractor, DPTForDepthEstimation
|
| 35 |
-
depth_estimator = DPTForDepthEstimation.from_pretrained("Intel/dpt-hybrid-midas").to("cuda")
|
| 36 |
-
feature_extractor = DPTFeatureExtractor.from_pretrained("Intel/dpt-hybrid-midas")
|
| 37 |
-
|
| 38 |
def resize_image(image):
|
| 39 |
image = image.convert('RGB')
|
| 40 |
current_size = image.size
|
|
@@ -64,10 +60,10 @@ def process(input_image, prompt, negative_prompt, num_steps, controlnet_conditio
|
|
| 64 |
block = gr.Blocks().queue()
|
| 65 |
|
| 66 |
with block:
|
| 67 |
-
gr.Markdown("## BRIA 2.2 ControlNet
|
| 68 |
gr.HTML('''
|
| 69 |
<p style="margin-bottom: 10px; font-size: 94%">
|
| 70 |
-
This is a demo for ControlNet
|
| 71 |
<a href="https://huggingface.co/briaai/BRIA-2.2" target="_blank">BRIA 2.2 text-to-image model</a> as backbone.
|
| 72 |
Trained on licensed data, BRIA 2.2 provide full legal liability coverage for copyright and privacy infringement.
|
| 73 |
</p>
|
|
|
|
| 31 |
pipe.enable_xformers_memory_efficient_attention()
|
| 32 |
pipe.force_zeros_for_empty_prompt = False
|
| 33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
def resize_image(image):
|
| 35 |
image = image.convert('RGB')
|
| 36 |
current_size = image.size
|
|
|
|
| 60 |
block = gr.Blocks().queue()
|
| 61 |
|
| 62 |
with block:
|
| 63 |
+
gr.Markdown("## BRIA 2.2 ControlNet Recoloring")
|
| 64 |
gr.HTML('''
|
| 65 |
<p style="margin-bottom: 10px; font-size: 94%">
|
| 66 |
+
This is a demo for ControlNet Recoloring that using
|
| 67 |
<a href="https://huggingface.co/briaai/BRIA-2.2" target="_blank">BRIA 2.2 text-to-image model</a> as backbone.
|
| 68 |
Trained on licensed data, BRIA 2.2 provide full legal liability coverage for copyright and privacy infringement.
|
| 69 |
</p>
|