dvir-bria commited on
Commit
b5ae5f0
1 Parent(s): 5cc6547

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +84 -1
README.md CHANGED
@@ -1,5 +1,88 @@
1
  ---
2
  license: other
3
  license_name: bria-2.0
4
- license_link: https://bria.ai/bria-2-0-huggingface-model-license-agreement/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: other
3
  license_name: bria-2.0
4
+ license_link: LICENSE
5
+ library_name: diffusers
6
+ inference:
7
+ parameters:
8
+ num_inference_steps: 50
9
+
10
+ tags:
11
+ - text-to-image
12
+ - controlnet model
13
+ - legal liability
14
+ - commercial use
15
+ extra_gated_prompt: This model weights by BRIA AI can be obtained after a commercial license is agreed upon. Fill in the form below and we reach out to you.
16
+ extra_gated_fields:
17
+ Name: text
18
+ Company/Org name: text
19
+ Org Type (Early/Growth Startup, Enterprise, Academy): text
20
+ Role: text
21
+ Country: text
22
+ Email: text
23
+ By submitting this form, I agree to BRIA’s Privacy policy and Terms & conditions, see links below: checkbox
24
  ---
25
+
26
+ # BRIA 2.0 ControlNet Canny Model Card
27
+
28
+ BRIA 2.0 trained exclusively on the largest multi-source commercial-grade licensed dataset, BRIA 2.0 guarantees best quality while safe for commercial use. BRIA's models were trained from scratch exclusively on licensed data from our esteemed data partners, including Getty Images, Alamy (part of PA Media Group), Envato, boutique niche agencies, independent photographers and artists.
29
+ BRIA 2.0 is safe for commercial use and provides full legal liability coverage for copyright and privacy infrigement and harmful content mitigation. In addition, having been trained on commercial-grade data, BRIA models set new standards of safety, diversity, equity and inclusion. Our dataset does not represent copyrighted materials, such as fictional characters, logos or trademarks, public figures, harmful content or privacy infringing content. Generation of these concepts using our models is impractical.
30
+
31
+ BRIA 2.0 ControlNet-Canny was trained on top of BRIA 2.0 Text-to-Image.
32
+
33
+ ![](examples_1344_768_grid.png)
34
+
35
+
36
+ ### Model Description
37
+
38
+ - **Developed by:** BRIA AI
39
+ - **Model type:** Latent diffusion text-to-image model
40
+ - **License:** [bria-2.0](https://bria.ai/bria-2-0-huggingface-model-license-agreement/)
41
+ - **Model Description:** BRIA 2.0 is a text-to-image model trained exclusively on a professional-grade, licensed dataset. It is designed for commercial use and includes full legal liability coverage.
42
+ - **Resources for more information:** [BRIA AI](https://bria.ai/)
43
+
44
+
45
+ ### Get Access
46
+ BRIA 2.0 Text-to-Image and BRIA 2.0 ControlNet-Canny are available under the BRIA 2.0 License Agreement, allowing commercial usage with an attribution model that supports our data contributors. To access the model, please contact us.
47
+ By submitting this form, you agree to BRIA’s [Privacy policy](https://bria.ai/privacy-policy/) and [Terms & conditions](https://bria.ai/terms-and-conditions/).
48
+
49
+
50
+
51
+
52
+
53
+ ### Code example using Diffusers
54
+
55
+
56
+ ```
57
+ pip install diffusers
58
+ ```
59
+
60
+
61
+ ```py
62
+ from diffusers import ControlNetModel, StableDiffusionXLControlNetPipeline
63
+ import torch
64
+
65
+ controlnet = ControlNetModel.from_pretrained(
66
+ "briaai/ControlNet-Canny",
67
+ torch_dtype=torch.float16
68
+ )
69
+
70
+ pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
71
+ "briaai/BRIA-2.0",
72
+ controlnet=controlnet,
73
+ torch_dtype=torch.float16,
74
+ )
75
+ pipe.to("cuda")
76
+
77
+ prompt = "A portrait of a Beautiful and playful ethereal singer, golden designs, highly detailed, blurry background"
78
+ negative_prompt = "Logo,Watermark,Text,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"
79
+
80
+ # Calculate Canny image
81
+ input_image = cv2.imread('pics/singer.png')
82
+ input_image = cv2.Canny(input_image, low_threshold, high_threshold)
83
+ input_image = input_image[:, :, None]
84
+ input_image = np.concatenate([input_image, input_image, input_image], axis=2)
85
+ canny_image = Image.fromarray(image)
86
+
87
+ image = pipe(prompt=prompt, negative_prompt=negative_prompt, image=canny_image, controlnet_conditioning_scale=1.0, height=1024, width=1024).images[0]
88
+ ```