Upload 5 files
Browse files- README.md +46 -0
- image_0.png +0 -0
- image_1.png +0 -0
- image_2.png +0 -0
- test_model_card_controlnet_flax.ipynb +223 -0
README.md
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: creativeml-openrail-m
|
3 |
+
library_name: diffusers
|
4 |
+
tags:
|
5 |
+
- stable-diffusion
|
6 |
+
- stable-diffusion-diffusers
|
7 |
+
- text-to-image
|
8 |
+
- diffusers
|
9 |
+
- controlnet
|
10 |
+
- jax-diffusers-event
|
11 |
+
inference: true
|
12 |
+
base_model: runwayml/stable-diffusion-v1-5
|
13 |
+
---
|
14 |
+
|
15 |
+
<!-- This model card has been generated automatically according to the information the training script had access to. You
|
16 |
+
should probably proofread and complete it, then remove this comment. -->
|
17 |
+
|
18 |
+
|
19 |
+
# controlnet- camaro/test
|
20 |
+
|
21 |
+
These are controlnet weights trained on runwayml/stable-diffusion-v1-5 with new type of conditioning. You can find some example images in the following.
|
22 |
+
|
23 |
+
prompt: validation_prompt
|
24 |
+
![images_0)](./images_0.png)
|
25 |
+
prompt: validation_prompt
|
26 |
+
![images_1)](./images_1.png)
|
27 |
+
prompt: validation_prompt
|
28 |
+
![images_2)](./images_2.png)
|
29 |
+
|
30 |
+
|
31 |
+
|
32 |
+
## Intended uses & limitations
|
33 |
+
|
34 |
+
#### How to use
|
35 |
+
|
36 |
+
```python
|
37 |
+
# TODO: add an example code snippet for running this diffusion pipeline
|
38 |
+
```
|
39 |
+
|
40 |
+
#### Limitations and bias
|
41 |
+
|
42 |
+
[TODO: provide examples of latent issues and potential remediations]
|
43 |
+
|
44 |
+
## Training details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
+
{
|
2 |
+
"cells": [
|
3 |
+
{
|
4 |
+
"cell_type": "code",
|
5 |
+
"source": [
|
6 |
+
"!git clone https://github.com/bamps53/diffusers\n",
|
7 |
+
"%cd diffusers\n",
|
8 |
+
"!git checkout 0f443c8b897c0bb9c034e524d1ab1127ab88d587\n",
|
9 |
+
"!pip install -q -e \".[dev]\""
|
10 |
+
],
|
11 |
+
"metadata": {
|
12 |
+
"colab": {
|
13 |
+
"base_uri": "https://localhost:8080/"
|
14 |
+
},
|
15 |
+
"id": "ZNgWSJQ-BViA",
|
16 |
+
"outputId": "f57c7bf5-2b70-4861-858a-bf3dec0f3690"
|
17 |
+
},
|
18 |
+
"id": "ZNgWSJQ-BViA",
|
19 |
+
"execution_count": 1,
|
20 |
+
"outputs": [
|
21 |
+
{
|
22 |
+
"output_type": "stream",
|
23 |
+
"name": "stdout",
|
24 |
+
"text": [
|
25 |
+
"/content/diffusers\n"
|
26 |
+
]
|
27 |
+
}
|
28 |
+
]
|
29 |
+
},
|
30 |
+
{
|
31 |
+
"cell_type": "code",
|
32 |
+
"source": [
|
33 |
+
"!wget https://huggingface.co/sayakpaul/test-model-card-template-dreambooth/resolve/main/image_0.png\n",
|
34 |
+
"!wget https://huggingface.co/sayakpaul/test-model-card-template-dreambooth/resolve/main/image_1.png\n",
|
35 |
+
"!wget https://huggingface.co/sayakpaul/test-model-card-template-dreambooth/resolve/main/image_2.png"
|
36 |
+
],
|
37 |
+
"metadata": {
|
38 |
+
"colab": {
|
39 |
+
"base_uri": "https://localhost:8080/"
|
40 |
+
},
|
41 |
+
"id": "pdpDJAul40ZB",
|
42 |
+
"outputId": "0f86603d-cef1-4a23-b2b6-afc3a4390522"
|
43 |
+
},
|
44 |
+
"id": "pdpDJAul40ZB",
|
45 |
+
"execution_count": 2,
|
46 |
+
"outputs": [
|
47 |
+
{
|
48 |
+
"output_type": "stream",
|
49 |
+
"name": "stdout",
|
50 |
+
"text": [
|
51 |
+
"--2024-02-08 13:47:00-- https://huggingface.co/sayakpaul/test-model-card-template-dreambooth/resolve/main/image_0.png\n",
|
52 |
+
"Resolving huggingface.co (huggingface.co)... 3.163.189.114, 3.163.189.37, 3.163.189.90, ...\n",
|
53 |
+
"Connecting to huggingface.co (huggingface.co)|3.163.189.114|:443... connected.\n",
|
54 |
+
"HTTP request sent, awaiting response... 200 OK\n",
|
55 |
+
"Length: 386612 (378K) [image/png]\n",
|
56 |
+
"Saving to: ‘image_0.png’\n",
|
57 |
+
"\n",
|
58 |
+
"image_0.png 100%[===================>] 377.55K --.-KB/s in 0.1s \n",
|
59 |
+
"\n",
|
60 |
+
"2024-02-08 13:47:00 (2.84 MB/s) - ‘image_0.png’ saved [386612/386612]\n",
|
61 |
+
"\n",
|
62 |
+
"--2024-02-08 13:47:00-- https://huggingface.co/sayakpaul/test-model-card-template-dreambooth/resolve/main/image_1.png\n",
|
63 |
+
"Resolving huggingface.co (huggingface.co)... 3.163.189.114, 3.163.189.37, 3.163.189.90, ...\n",
|
64 |
+
"Connecting to huggingface.co (huggingface.co)|3.163.189.114|:443... connected.\n",
|
65 |
+
"HTTP request sent, awaiting response... 200 OK\n",
|
66 |
+
"Length: 386612 (378K) [image/png]\n",
|
67 |
+
"Saving to: ‘image_1.png’\n",
|
68 |
+
"\n",
|
69 |
+
"image_1.png 100%[===================>] 377.55K --.-KB/s in 0.03s \n",
|
70 |
+
"\n",
|
71 |
+
"2024-02-08 13:47:00 (14.1 MB/s) - ‘image_1.png’ saved [386612/386612]\n",
|
72 |
+
"\n",
|
73 |
+
"--2024-02-08 13:47:00-- https://huggingface.co/sayakpaul/test-model-card-template-dreambooth/resolve/main/image_2.png\n",
|
74 |
+
"Resolving huggingface.co (huggingface.co)... 3.163.189.114, 3.163.189.37, 3.163.189.90, ...\n",
|
75 |
+
"Connecting to huggingface.co (huggingface.co)|3.163.189.114|:443... connected.\n",
|
76 |
+
"HTTP request sent, awaiting response... 200 OK\n",
|
77 |
+
"Length: 386612 (378K) [image/png]\n",
|
78 |
+
"Saving to: ‘image_2.png’\n",
|
79 |
+
"\n",
|
80 |
+
"image_2.png 100%[===================>] 377.55K --.-KB/s in 0.07s \n",
|
81 |
+
"\n",
|
82 |
+
"2024-02-08 13:47:01 (5.29 MB/s) - ‘image_2.png’ saved [386612/386612]\n",
|
83 |
+
"\n"
|
84 |
+
]
|
85 |
+
}
|
86 |
+
]
|
87 |
+
},
|
88 |
+
{
|
89 |
+
"cell_type": "code",
|
90 |
+
"source": [
|
91 |
+
"from diffusers.utils import load_image\n",
|
92 |
+
"from examples.controlnet.train_controlnet_flax import save_model_card\n",
|
93 |
+
"\n",
|
94 |
+
"images = [load_image(f\"image_{i}.png\") for i in range(3)]\n",
|
95 |
+
"\n",
|
96 |
+
"image_logs = [\n",
|
97 |
+
" dict(\n",
|
98 |
+
" images=[image],\n",
|
99 |
+
" validation_prompt=\"validation_prompt\",\n",
|
100 |
+
" validation_image=image,\n",
|
101 |
+
" )\n",
|
102 |
+
" for image in images\n",
|
103 |
+
"]\n",
|
104 |
+
"save_model_card(\n",
|
105 |
+
" repo_id=\"camaro/test\",\n",
|
106 |
+
" image_logs=image_logs,\n",
|
107 |
+
" base_model=\"runwayml/stable-diffusion-v1-5\",\n",
|
108 |
+
" repo_folder=\".\",\n",
|
109 |
+
")"
|
110 |
+
],
|
111 |
+
"metadata": {
|
112 |
+
"id": "v7vs7eQyDeX1"
|
113 |
+
},
|
114 |
+
"id": "v7vs7eQyDeX1",
|
115 |
+
"execution_count": 4,
|
116 |
+
"outputs": []
|
117 |
+
},
|
118 |
+
{
|
119 |
+
"cell_type": "code",
|
120 |
+
"execution_count": 5,
|
121 |
+
"id": "b19ff19c-fff0-469f-b004-dd731edbffa9",
|
122 |
+
"metadata": {
|
123 |
+
"colab": {
|
124 |
+
"base_uri": "https://localhost:8080/"
|
125 |
+
},
|
126 |
+
"id": "b19ff19c-fff0-469f-b004-dd731edbffa9",
|
127 |
+
"outputId": "0092c531-70b6-40c0-de0b-2c79e01786df"
|
128 |
+
},
|
129 |
+
"outputs": [
|
130 |
+
{
|
131 |
+
"output_type": "stream",
|
132 |
+
"name": "stdout",
|
133 |
+
"text": [
|
134 |
+
"---\n",
|
135 |
+
"license: creativeml-openrail-m\n",
|
136 |
+
"library_name: diffusers\n",
|
137 |
+
"tags:\n",
|
138 |
+
"- stable-diffusion\n",
|
139 |
+
"- stable-diffusion-diffusers\n",
|
140 |
+
"- text-to-image\n",
|
141 |
+
"- diffusers\n",
|
142 |
+
"- controlnet\n",
|
143 |
+
"- jax-diffusers-event\n",
|
144 |
+
"inference: true\n",
|
145 |
+
"base_model: runwayml/stable-diffusion-v1-5\n",
|
146 |
+
"---\n",
|
147 |
+
"\n",
|
148 |
+
"<!-- This model card has been generated automatically according to the information the training script had access to. You\n",
|
149 |
+
"should probably proofread and complete it, then remove this comment. -->\n",
|
150 |
+
"\n",
|
151 |
+
"\n",
|
152 |
+
"# controlnet- camaro/test\n",
|
153 |
+
"\n",
|
154 |
+
"These are controlnet weights trained on runwayml/stable-diffusion-v1-5 with new type of conditioning. You can find some example images in the following. \n",
|
155 |
+
"\n",
|
156 |
+
"prompt: validation_prompt\n",
|
157 |
+
"![images_0)](./images_0.png)\n",
|
158 |
+
"prompt: validation_prompt\n",
|
159 |
+
"![images_1)](./images_1.png)\n",
|
160 |
+
"prompt: validation_prompt\n",
|
161 |
+
"![images_2)](./images_2.png)\n",
|
162 |
+
"\n",
|
163 |
+
"\n",
|
164 |
+
"\n",
|
165 |
+
"## Intended uses & limitations\n",
|
166 |
+
"\n",
|
167 |
+
"#### How to use\n",
|
168 |
+
"\n",
|
169 |
+
"```python\n",
|
170 |
+
"# TODO: add an example code snippet for running this diffusion pipeline\n",
|
171 |
+
"```\n",
|
172 |
+
"\n",
|
173 |
+
"#### Limitations and bias\n",
|
174 |
+
"\n",
|
175 |
+
"[TODO: provide examples of latent issues and potential remediations]\n",
|
176 |
+
"\n",
|
177 |
+
"## Training details\n",
|
178 |
+
"\n",
|
179 |
+
"[TODO: describe the data used to train the model]"
|
180 |
+
]
|
181 |
+
}
|
182 |
+
],
|
183 |
+
"source": [
|
184 |
+
"!cat README.md"
|
185 |
+
]
|
186 |
+
},
|
187 |
+
{
|
188 |
+
"cell_type": "code",
|
189 |
+
"source": [],
|
190 |
+
"metadata": {
|
191 |
+
"id": "Y3uTj1bv5Amw"
|
192 |
+
},
|
193 |
+
"id": "Y3uTj1bv5Amw",
|
194 |
+
"execution_count": null,
|
195 |
+
"outputs": []
|
196 |
+
}
|
197 |
+
],
|
198 |
+
"metadata": {
|
199 |
+
"kernelspec": {
|
200 |
+
"display_name": "Python 3",
|
201 |
+
"name": "python3"
|
202 |
+
},
|
203 |
+
"language_info": {
|
204 |
+
"codemirror_mode": {
|
205 |
+
"name": "ipython",
|
206 |
+
"version": 3
|
207 |
+
},
|
208 |
+
"file_extension": ".py",
|
209 |
+
"mimetype": "text/x-python",
|
210 |
+
"name": "python",
|
211 |
+
"nbconvert_exporter": "python",
|
212 |
+
"pygments_lexer": "ipython3",
|
213 |
+
"version": "3.9.17"
|
214 |
+
},
|
215 |
+
"colab": {
|
216 |
+
"provenance": [],
|
217 |
+
"gpuType": "T4"
|
218 |
+
},
|
219 |
+
"accelerator": "GPU"
|
220 |
+
},
|
221 |
+
"nbformat": 4,
|
222 |
+
"nbformat_minor": 5
|
223 |
+
}
|