camaro commited on
Commit
627d0c5
1 Parent(s): e35c6fb

Delete test_model_card_controlnet_sdxl.ipynb

Browse files
Files changed (1) hide show
  1. test_model_card_controlnet_sdxl.ipynb +0 -620
test_model_card_controlnet_sdxl.ipynb DELETED
@@ -1,620 +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 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_sdxl 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
- "colab": {
113
- "base_uri": "https://localhost:8080/",
114
- "height": 190,
115
- "referenced_widgets": [
116
- "6af63801222041e084b8dcc7d9717ea0",
117
- "e7db57b5a4604482a9c3f6a583c229ad",
118
- "b40041c9437a4a908a9408d6332a8b40",
119
- "78e8a8b996cc44138e8afcf00264be7c",
120
- "442696138b0f431e93e0fa7ac7bd5f6d",
121
- "aec159b072b64f1a8f5d28c09f2a0724",
122
- "57b051e7336947c5bab73128a0b50996",
123
- "39688812a2ff48bf9a77025ad5e0c55b",
124
- "8fcc3694f4e44f528b257dffe7e46f30",
125
- "3491736d5fa044db9da7df84d0bcf4d3",
126
- "b7060bfb30304f22a16f0a557e32bbe3"
127
- ]
128
- },
129
- "id": "v7vs7eQyDeX1",
130
- "outputId": "2dc7fcf4-b6ec-4ee4-b951-872f28e510d0"
131
- },
132
- "id": "v7vs7eQyDeX1",
133
- "execution_count": 2,
134
- "outputs": [
135
- {
136
- "output_type": "stream",
137
- "name": "stderr",
138
- "text": [
139
- "The cache for model files in Transformers v4.22.0 has been updated. Migrating your old cache. This is a one-time only operation. You can interrupt this and resume the migration later on by calling `transformers.utils.move_cache()`.\n"
140
- ]
141
- },
142
- {
143
- "output_type": "display_data",
144
- "data": {
145
- "text/plain": [
146
- "0it [00:00, ?it/s]"
147
- ],
148
- "application/vnd.jupyter.widget-view+json": {
149
- "version_major": 2,
150
- "version_minor": 0,
151
- "model_id": "6af63801222041e084b8dcc7d9717ea0"
152
- }
153
- },
154
- "metadata": {}
155
- },
156
- {
157
- "output_type": "stream",
158
- "name": "stderr",
159
- "text": [
160
- "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_token.py:88: UserWarning: \n",
161
- "The secret `HF_TOKEN` does not exist in your Colab secrets.\n",
162
- "To authenticate with the Hugging Face Hub, create a token in your settings tab (https://huggingface.co/settings/tokens), set it as secret in your Google Colab and restart your session.\n",
163
- "You will be able to reuse this secret in all of your notebooks.\n",
164
- "Please note that authentication is recommended but still optional to access public models or datasets.\n",
165
- " warnings.warn(\n"
166
- ]
167
- }
168
- ]
169
- },
170
- {
171
- "cell_type": "code",
172
- "execution_count": 3,
173
- "id": "b19ff19c-fff0-469f-b004-dd731edbffa9",
174
- "metadata": {
175
- "colab": {
176
- "base_uri": "https://localhost:8080/"
177
- },
178
- "id": "b19ff19c-fff0-469f-b004-dd731edbffa9",
179
- "outputId": "f1248d0f-9909-44b5-d0e8-72ceab6640a2"
180
- },
181
- "outputs": [
182
- {
183
- "output_type": "stream",
184
- "name": "stdout",
185
- "text": [
186
- "---\n",
187
- "license: openrail++\n",
188
- "library_name: diffusers\n",
189
- "tags:\n",
190
- "- stable-diffusion-xl\n",
191
- "- stable-diffusion-xl-diffusers\n",
192
- "- text-to-image\n",
193
- "- diffusers\n",
194
- "- controlnet\n",
195
- "inference: true\n",
196
- "base_model: runwayml/stable-diffusion-v1-5\n",
197
- "---\n",
198
- "\n",
199
- "<!-- This model card has been generated automatically according to the information the training script had access to. You\n",
200
- "should probably proofread and complete it, then remove this comment. -->\n",
201
- "\n",
202
- "\n",
203
- "# controlnet-camaro/test\n",
204
- "\n",
205
- "These are controlnet weights trained on runwayml/stable-diffusion-v1-5 with new type of conditioning.\n",
206
- "You can find some example images below.\n",
207
- "prompt: validation_prompt\n",
208
- "![images_0)](./images_0.png)\n",
209
- "prompt: validation_prompt\n",
210
- "![images_1)](./images_1.png)\n",
211
- "prompt: validation_prompt\n",
212
- "![images_2)](./images_2.png)\n",
213
- "\n",
214
- "\n",
215
- "\n",
216
- "## Intended uses & limitations\n",
217
- "\n",
218
- "#### How to use\n",
219
- "\n",
220
- "```python\n",
221
- "# TODO: add an example code snippet for running this diffusion pipeline\n",
222
- "```\n",
223
- "\n",
224
- "#### Limitations and bias\n",
225
- "\n",
226
- "[TODO: provide examples of latent issues and potential remediations]\n",
227
- "\n",
228
- "## Training details\n",
229
- "\n",
230
- "[TODO: describe the data used to train the model]"
231
- ]
232
- }
233
- ],
234
- "source": [
235
- "!cat README.md"
236
- ]
237
- },
238
- {
239
- "cell_type": "code",
240
- "source": [],
241
- "metadata": {
242
- "id": "Y3uTj1bv5Amw"
243
- },
244
- "id": "Y3uTj1bv5Amw",
245
- "execution_count": null,
246
- "outputs": []
247
- }
248
- ],
249
- "metadata": {
250
- "kernelspec": {
251
- "display_name": "Python 3",
252
- "name": "python3"
253
- },
254
- "language_info": {
255
- "codemirror_mode": {
256
- "name": "ipython",
257
- "version": 3
258
- },
259
- "file_extension": ".py",
260
- "mimetype": "text/x-python",
261
- "name": "python",
262
- "nbconvert_exporter": "python",
263
- "pygments_lexer": "ipython3",
264
- "version": "3.9.17"
265
- },
266
- "colab": {
267
- "provenance": [],
268
- "gpuType": "T4"
269
- },
270
- "accelerator": "GPU",
271
- "widgets": {
272
- "application/vnd.jupyter.widget-state+json": {
273
- "6af63801222041e084b8dcc7d9717ea0": {
274
- "model_module": "@jupyter-widgets/controls",
275
- "model_name": "HBoxModel",
276
- "model_module_version": "1.5.0",
277
- "state": {
278
- "_dom_classes": [],
279
- "_model_module": "@jupyter-widgets/controls",
280
- "_model_module_version": "1.5.0",
281
- "_model_name": "HBoxModel",
282
- "_view_count": null,
283
- "_view_module": "@jupyter-widgets/controls",
284
- "_view_module_version": "1.5.0",
285
- "_view_name": "HBoxView",
286
- "box_style": "",
287
- "children": [
288
- "IPY_MODEL_e7db57b5a4604482a9c3f6a583c229ad",
289
- "IPY_MODEL_b40041c9437a4a908a9408d6332a8b40",
290
- "IPY_MODEL_78e8a8b996cc44138e8afcf00264be7c"
291
- ],
292
- "layout": "IPY_MODEL_442696138b0f431e93e0fa7ac7bd5f6d"
293
- }
294
- },
295
- "e7db57b5a4604482a9c3f6a583c229ad": {
296
- "model_module": "@jupyter-widgets/controls",
297
- "model_name": "HTMLModel",
298
- "model_module_version": "1.5.0",
299
- "state": {
300
- "_dom_classes": [],
301
- "_model_module": "@jupyter-widgets/controls",
302
- "_model_module_version": "1.5.0",
303
- "_model_name": "HTMLModel",
304
- "_view_count": null,
305
- "_view_module": "@jupyter-widgets/controls",
306
- "_view_module_version": "1.5.0",
307
- "_view_name": "HTMLView",
308
- "description": "",
309
- "description_tooltip": null,
310
- "layout": "IPY_MODEL_aec159b072b64f1a8f5d28c09f2a0724",
311
- "placeholder": "​",
312
- "style": "IPY_MODEL_57b051e7336947c5bab73128a0b50996",
313
- "value": ""
314
- }
315
- },
316
- "b40041c9437a4a908a9408d6332a8b40": {
317
- "model_module": "@jupyter-widgets/controls",
318
- "model_name": "FloatProgressModel",
319
- "model_module_version": "1.5.0",
320
- "state": {
321
- "_dom_classes": [],
322
- "_model_module": "@jupyter-widgets/controls",
323
- "_model_module_version": "1.5.0",
324
- "_model_name": "FloatProgressModel",
325
- "_view_count": null,
326
- "_view_module": "@jupyter-widgets/controls",
327
- "_view_module_version": "1.5.0",
328
- "_view_name": "ProgressView",
329
- "bar_style": "success",
330
- "description": "",
331
- "description_tooltip": null,
332
- "layout": "IPY_MODEL_39688812a2ff48bf9a77025ad5e0c55b",
333
- "max": 1,
334
- "min": 0,
335
- "orientation": "horizontal",
336
- "style": "IPY_MODEL_8fcc3694f4e44f528b257dffe7e46f30",
337
- "value": 0
338
- }
339
- },
340
- "78e8a8b996cc44138e8afcf00264be7c": {
341
- "model_module": "@jupyter-widgets/controls",
342
- "model_name": "HTMLModel",
343
- "model_module_version": "1.5.0",
344
- "state": {
345
- "_dom_classes": [],
346
- "_model_module": "@jupyter-widgets/controls",
347
- "_model_module_version": "1.5.0",
348
- "_model_name": "HTMLModel",
349
- "_view_count": null,
350
- "_view_module": "@jupyter-widgets/controls",
351
- "_view_module_version": "1.5.0",
352
- "_view_name": "HTMLView",
353
- "description": "",
354
- "description_tooltip": null,
355
- "layout": "IPY_MODEL_3491736d5fa044db9da7df84d0bcf4d3",
356
- "placeholder": "​",
357
- "style": "IPY_MODEL_b7060bfb30304f22a16f0a557e32bbe3",
358
- "value": " 0/0 [00:00&lt;?, ?it/s]"
359
- }
360
- },
361
- "442696138b0f431e93e0fa7ac7bd5f6d": {
362
- "model_module": "@jupyter-widgets/base",
363
- "model_name": "LayoutModel",
364
- "model_module_version": "1.2.0",
365
- "state": {
366
- "_model_module": "@jupyter-widgets/base",
367
- "_model_module_version": "1.2.0",
368
- "_model_name": "LayoutModel",
369
- "_view_count": null,
370
- "_view_module": "@jupyter-widgets/base",
371
- "_view_module_version": "1.2.0",
372
- "_view_name": "LayoutView",
373
- "align_content": null,
374
- "align_items": null,
375
- "align_self": null,
376
- "border": null,
377
- "bottom": null,
378
- "display": null,
379
- "flex": null,
380
- "flex_flow": null,
381
- "grid_area": null,
382
- "grid_auto_columns": null,
383
- "grid_auto_flow": null,
384
- "grid_auto_rows": null,
385
- "grid_column": null,
386
- "grid_gap": null,
387
- "grid_row": null,
388
- "grid_template_areas": null,
389
- "grid_template_columns": null,
390
- "grid_template_rows": null,
391
- "height": null,
392
- "justify_content": null,
393
- "justify_items": null,
394
- "left": null,
395
- "margin": null,
396
- "max_height": null,
397
- "max_width": null,
398
- "min_height": null,
399
- "min_width": null,
400
- "object_fit": null,
401
- "object_position": null,
402
- "order": null,
403
- "overflow": null,
404
- "overflow_x": null,
405
- "overflow_y": null,
406
- "padding": null,
407
- "right": null,
408
- "top": null,
409
- "visibility": null,
410
- "width": null
411
- }
412
- },
413
- "aec159b072b64f1a8f5d28c09f2a0724": {
414
- "model_module": "@jupyter-widgets/base",
415
- "model_name": "LayoutModel",
416
- "model_module_version": "1.2.0",
417
- "state": {
418
- "_model_module": "@jupyter-widgets/base",
419
- "_model_module_version": "1.2.0",
420
- "_model_name": "LayoutModel",
421
- "_view_count": null,
422
- "_view_module": "@jupyter-widgets/base",
423
- "_view_module_version": "1.2.0",
424
- "_view_name": "LayoutView",
425
- "align_content": null,
426
- "align_items": null,
427
- "align_self": null,
428
- "border": null,
429
- "bottom": null,
430
- "display": null,
431
- "flex": null,
432
- "flex_flow": null,
433
- "grid_area": null,
434
- "grid_auto_columns": null,
435
- "grid_auto_flow": null,
436
- "grid_auto_rows": null,
437
- "grid_column": null,
438
- "grid_gap": null,
439
- "grid_row": null,
440
- "grid_template_areas": null,
441
- "grid_template_columns": null,
442
- "grid_template_rows": null,
443
- "height": null,
444
- "justify_content": null,
445
- "justify_items": null,
446
- "left": null,
447
- "margin": null,
448
- "max_height": null,
449
- "max_width": null,
450
- "min_height": null,
451
- "min_width": null,
452
- "object_fit": null,
453
- "object_position": null,
454
- "order": null,
455
- "overflow": null,
456
- "overflow_x": null,
457
- "overflow_y": null,
458
- "padding": null,
459
- "right": null,
460
- "top": null,
461
- "visibility": null,
462
- "width": null
463
- }
464
- },
465
- "57b051e7336947c5bab73128a0b50996": {
466
- "model_module": "@jupyter-widgets/controls",
467
- "model_name": "DescriptionStyleModel",
468
- "model_module_version": "1.5.0",
469
- "state": {
470
- "_model_module": "@jupyter-widgets/controls",
471
- "_model_module_version": "1.5.0",
472
- "_model_name": "DescriptionStyleModel",
473
- "_view_count": null,
474
- "_view_module": "@jupyter-widgets/base",
475
- "_view_module_version": "1.2.0",
476
- "_view_name": "StyleView",
477
- "description_width": ""
478
- }
479
- },
480
- "39688812a2ff48bf9a77025ad5e0c55b": {
481
- "model_module": "@jupyter-widgets/base",
482
- "model_name": "LayoutModel",
483
- "model_module_version": "1.2.0",
484
- "state": {
485
- "_model_module": "@jupyter-widgets/base",
486
- "_model_module_version": "1.2.0",
487
- "_model_name": "LayoutModel",
488
- "_view_count": null,
489
- "_view_module": "@jupyter-widgets/base",
490
- "_view_module_version": "1.2.0",
491
- "_view_name": "LayoutView",
492
- "align_content": null,
493
- "align_items": null,
494
- "align_self": null,
495
- "border": null,
496
- "bottom": null,
497
- "display": null,
498
- "flex": null,
499
- "flex_flow": null,
500
- "grid_area": null,
501
- "grid_auto_columns": null,
502
- "grid_auto_flow": null,
503
- "grid_auto_rows": null,
504
- "grid_column": null,
505
- "grid_gap": null,
506
- "grid_row": null,
507
- "grid_template_areas": null,
508
- "grid_template_columns": null,
509
- "grid_template_rows": null,
510
- "height": null,
511
- "justify_content": null,
512
- "justify_items": null,
513
- "left": null,
514
- "margin": null,
515
- "max_height": null,
516
- "max_width": null,
517
- "min_height": null,
518
- "min_width": null,
519
- "object_fit": null,
520
- "object_position": null,
521
- "order": null,
522
- "overflow": null,
523
- "overflow_x": null,
524
- "overflow_y": null,
525
- "padding": null,
526
- "right": null,
527
- "top": null,
528
- "visibility": null,
529
- "width": "20px"
530
- }
531
- },
532
- "8fcc3694f4e44f528b257dffe7e46f30": {
533
- "model_module": "@jupyter-widgets/controls",
534
- "model_name": "ProgressStyleModel",
535
- "model_module_version": "1.5.0",
536
- "state": {
537
- "_model_module": "@jupyter-widgets/controls",
538
- "_model_module_version": "1.5.0",
539
- "_model_name": "ProgressStyleModel",
540
- "_view_count": null,
541
- "_view_module": "@jupyter-widgets/base",
542
- "_view_module_version": "1.2.0",
543
- "_view_name": "StyleView",
544
- "bar_color": null,
545
- "description_width": ""
546
- }
547
- },
548
- "3491736d5fa044db9da7df84d0bcf4d3": {
549
- "model_module": "@jupyter-widgets/base",
550
- "model_name": "LayoutModel",
551
- "model_module_version": "1.2.0",
552
- "state": {
553
- "_model_module": "@jupyter-widgets/base",
554
- "_model_module_version": "1.2.0",
555
- "_model_name": "LayoutModel",
556
- "_view_count": null,
557
- "_view_module": "@jupyter-widgets/base",
558
- "_view_module_version": "1.2.0",
559
- "_view_name": "LayoutView",
560
- "align_content": null,
561
- "align_items": null,
562
- "align_self": null,
563
- "border": null,
564
- "bottom": null,
565
- "display": null,
566
- "flex": null,
567
- "flex_flow": null,
568
- "grid_area": null,
569
- "grid_auto_columns": null,
570
- "grid_auto_flow": null,
571
- "grid_auto_rows": null,
572
- "grid_column": null,
573
- "grid_gap": null,
574
- "grid_row": null,
575
- "grid_template_areas": null,
576
- "grid_template_columns": null,
577
- "grid_template_rows": null,
578
- "height": null,
579
- "justify_content": null,
580
- "justify_items": null,
581
- "left": null,
582
- "margin": null,
583
- "max_height": null,
584
- "max_width": null,
585
- "min_height": null,
586
- "min_width": null,
587
- "object_fit": null,
588
- "object_position": null,
589
- "order": null,
590
- "overflow": null,
591
- "overflow_x": null,
592
- "overflow_y": null,
593
- "padding": null,
594
- "right": null,
595
- "top": null,
596
- "visibility": null,
597
- "width": null
598
- }
599
- },
600
- "b7060bfb30304f22a16f0a557e32bbe3": {
601
- "model_module": "@jupyter-widgets/controls",
602
- "model_name": "DescriptionStyleModel",
603
- "model_module_version": "1.5.0",
604
- "state": {
605
- "_model_module": "@jupyter-widgets/controls",
606
- "_model_module_version": "1.5.0",
607
- "_model_name": "DescriptionStyleModel",
608
- "_view_count": null,
609
- "_view_module": "@jupyter-widgets/base",
610
- "_view_module_version": "1.2.0",
611
- "_view_name": "StyleView",
612
- "description_width": ""
613
- }
614
- }
615
- }
616
- }
617
- },
618
- "nbformat": 4,
619
- "nbformat_minor": 5
620
- }