camaro commited on
Commit
495f5e3
1 Parent(s): a08d4f1

Delete test_model_card.ipynb

Browse files
Files changed (1) hide show
  1. test_model_card.ipynb +0 -211
test_model_card.ipynb DELETED
@@ -1,211 +0,0 @@
1
- {
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 2b8f0991f46749f22aa1394f19a80275d27d3fb9\n",
9
- "!pip install -e \".[dev]\""
10
- ],
11
- "metadata": {
12
- "id": "ZNgWSJQ-BViA",
13
- "outputId": "3956d806-fc52-467d-e73f-a09961ed147d",
14
- "colab": {
15
- "base_uri": "https://localhost:8080/"
16
- }
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
- "id": "pdpDJAul40ZB",
39
- "outputId": "d6dbe2fa-c611-48dc-ed28-af4341f0e33e",
40
- "colab": {
41
- "base_uri": "https://localhost:8080/"
42
- }
43
- },
44
- "id": "pdpDJAul40ZB",
45
- "execution_count": 8,
46
- "outputs": [
47
- {
48
- "output_type": "stream",
49
- "name": "stdout",
50
- "text": [
51
- "--2024-02-08 13:23:49-- https://huggingface.co/sayakpaul/test-model-card-template-dreambooth/resolve/main/image_1.png\n",
52
- "Resolving huggingface.co (huggingface.co)... 18.67.181.126, 18.67.181.36, 18.67.181.124, ...\n",
53
- "Connecting to huggingface.co (huggingface.co)|18.67.181.126|:443... connected.\n",
54
- "HTTP request sent, awaiting response... 200 OK\n",
55
- "Length: 386612 (378K) [image/png]\n",
56
- "Saving to: ‘image_1.png’\n",
57
- "\n",
58
- "image_1.png 100%[===================>] 377.55K 501KB/s in 0.8s \n",
59
- "\n",
60
- "2024-02-08 13:23:50 (501 KB/s) - ‘image_1.png’ saved [386612/386612]\n",
61
- "\n",
62
- "--2024-02-08 13:23:51-- https://huggingface.co/sayakpaul/test-model-card-template-dreambooth/resolve/main/image_2.png\n",
63
- "Resolving huggingface.co (huggingface.co)... 18.67.181.126, 18.67.181.36, 18.67.181.124, ...\n",
64
- "Connecting to huggingface.co (huggingface.co)|18.67.181.126|:443... connected.\n",
65
- "HTTP request sent, awaiting response... 200 OK\n",
66
- "Length: 386612 (378K) [image/png]\n",
67
- "Saving to: ‘image_2.png’\n",
68
- "\n",
69
- "image_2.png 100%[===================>] 377.55K 503KB/s in 0.8s \n",
70
- "\n",
71
- "2024-02-08 13:23:52 (503 KB/s) - ‘image_2.png’ saved [386612/386612]\n",
72
- "\n"
73
- ]
74
- }
75
- ]
76
- },
77
- {
78
- "cell_type": "code",
79
- "source": [
80
- "from diffusers.utils import load_image\n",
81
- "from examples.controlnet.train_controlnet import save_model_card\n",
82
- "\n",
83
- "images = [load_image(f\"image_{i}.png\") for i in range(3)]\n",
84
- "\n",
85
- "image_logs = [\n",
86
- " dict(\n",
87
- " images=[image],\n",
88
- " validation_prompt=\"validation_prompt\",\n",
89
- " validation_image=image,\n",
90
- " )\n",
91
- " for image in images\n",
92
- "]\n",
93
- "save_model_card(\n",
94
- " repo_id=\"camaro/test\",\n",
95
- " image_logs=image_logs,\n",
96
- " base_model=\"runwayml/stable-diffusion-v1-5\",\n",
97
- " repo_folder=\".\",\n",
98
- ")"
99
- ],
100
- "metadata": {
101
- "id": "v7vs7eQyDeX1"
102
- },
103
- "id": "v7vs7eQyDeX1",
104
- "execution_count": 9,
105
- "outputs": []
106
- },
107
- {
108
- "cell_type": "code",
109
- "execution_count": 10,
110
- "id": "b19ff19c-fff0-469f-b004-dd731edbffa9",
111
- "metadata": {
112
- "id": "b19ff19c-fff0-469f-b004-dd731edbffa9",
113
- "outputId": "b8682622-e0ce-4015-91a3-2e5b018f1c4f",
114
- "colab": {
115
- "base_uri": "https://localhost:8080/"
116
- }
117
- },
118
- "outputs": [
119
- {
120
- "output_type": "stream",
121
- "name": "stdout",
122
- "text": [
123
- "---\n",
124
- "license: creativeml-openrail-m\n",
125
- "library_name: diffusers\n",
126
- "tags:\n",
127
- "- stable-diffusion\n",
128
- "- stable-diffusion-diffusers\n",
129
- "- text-to-image\n",
130
- "- diffusers\n",
131
- "- controlnet\n",
132
- "inference: true\n",
133
- "base_model: runwayml/stable-diffusion-v1-5\n",
134
- "---\n",
135
- "\n",
136
- "<!-- This model card has been generated automatically according to the information the training script had access to. You\n",
137
- "should probably proofread and complete it, then remove this comment. -->\n",
138
- "\n",
139
- "\n",
140
- "# controlnet-camaro/test\n",
141
- "\n",
142
- "These are controlnet weights trained on runwayml/stable-diffusion-v1-5 with new type of conditioning.\n",
143
- "You can find some example images below.\n",
144
- "prompt: validation_prompt\n",
145
- "![images_0)](./images_0.png)\n",
146
- "prompt: validation_prompt\n",
147
- "![images_1)](./images_1.png)\n",
148
- "prompt: validation_prompt\n",
149
- "![images_2)](./images_2.png)\n",
150
- "\n",
151
- "\n",
152
- "\n",
153
- "## Intended uses & limitations\n",
154
- "\n",
155
- "#### How to use\n",
156
- "\n",
157
- "```python\n",
158
- "# TODO: add an example code snippet for running this diffusion pipeline\n",
159
- "```\n",
160
- "\n",
161
- "#### Limitations and bias\n",
162
- "\n",
163
- "[TODO: provide examples of latent issues and potential remediations]\n",
164
- "\n",
165
- "## Training details\n",
166
- "\n",
167
- "[TODO: describe the data used to train the model]"
168
- ]
169
- }
170
- ],
171
- "source": [
172
- "!cat README.md"
173
- ]
174
- },
175
- {
176
- "cell_type": "code",
177
- "source": [],
178
- "metadata": {
179
- "id": "Y3uTj1bv5Amw"
180
- },
181
- "id": "Y3uTj1bv5Amw",
182
- "execution_count": null,
183
- "outputs": []
184
- }
185
- ],
186
- "metadata": {
187
- "kernelspec": {
188
- "display_name": "Python 3",
189
- "name": "python3"
190
- },
191
- "language_info": {
192
- "codemirror_mode": {
193
- "name": "ipython",
194
- "version": 3
195
- },
196
- "file_extension": ".py",
197
- "mimetype": "text/x-python",
198
- "name": "python",
199
- "nbconvert_exporter": "python",
200
- "pygments_lexer": "ipython3",
201
- "version": "3.9.17"
202
- },
203
- "colab": {
204
- "provenance": [],
205
- "gpuType": "T4"
206
- },
207
- "accelerator": "GPU"
208
- },
209
- "nbformat": 4,
210
- "nbformat_minor": 5
211
- }