joshcarp commited on
Commit
e0ad5f2
1 Parent(s): 322f187

Upload noor_generator.ipynb

Browse files
Files changed (1) hide show
  1. noor_generator.ipynb +302 -0
noor_generator.ipynb ADDED
@@ -0,0 +1,302 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "metadata": {
7
+ "colab": {
8
+ "base_uri": "https://localhost:8080/"
9
+ },
10
+ "id": "v92yeE-uOxsz",
11
+ "outputId": "0667f974-84d7-443b-97fb-f976d90114f4"
12
+ },
13
+ "outputs": [
14
+ {
15
+ "output_type": "stream",
16
+ "name": "stdout",
17
+ "text": [
18
+ "Requirement already satisfied: diffusers in /usr/local/lib/python3.10/dist-packages (0.28.0.dev0)\n",
19
+ "Requirement already satisfied: transformers in /usr/local/lib/python3.10/dist-packages (4.40.2)\n",
20
+ "Requirement already satisfied: accelerate in /usr/local/lib/python3.10/dist-packages (0.30.0)\n",
21
+ "Requirement already satisfied: datasets in /usr/local/lib/python3.10/dist-packages (2.19.1)\n",
22
+ "Requirement already satisfied: ftfy in /usr/local/lib/python3.10/dist-packages (6.2.0)\n",
23
+ "Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.10/dist-packages (from diffusers) (7.1.0)\n",
24
+ "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from diffusers) (3.14.0)\n",
25
+ "Requirement already satisfied: huggingface-hub>=0.20.2 in /usr/local/lib/python3.10/dist-packages (from diffusers) (0.23.0)\n",
26
+ "Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from diffusers) (1.25.2)\n",
27
+ "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from diffusers) (2023.12.25)\n",
28
+ "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from diffusers) (2.31.0)\n",
29
+ "Requirement already satisfied: safetensors>=0.3.1 in /usr/local/lib/python3.10/dist-packages (from diffusers) (0.4.3)\n",
30
+ "Requirement already satisfied: Pillow in /usr/local/lib/python3.10/dist-packages (from diffusers) (9.4.0)\n",
31
+ "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from transformers) (24.0)\n",
32
+ "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from transformers) (6.0.1)\n",
33
+ "Requirement already satisfied: tokenizers<0.20,>=0.19 in /usr/local/lib/python3.10/dist-packages (from transformers) (0.19.1)\n",
34
+ "Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.10/dist-packages (from transformers) (4.66.4)\n",
35
+ "Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from accelerate) (5.9.5)\n",
36
+ "Requirement already satisfied: torch>=1.10.0 in /usr/local/lib/python3.10/dist-packages (from accelerate) (2.2.1+cu121)\n",
37
+ "Requirement already satisfied: pyarrow>=12.0.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (14.0.2)\n",
38
+ "Requirement already satisfied: pyarrow-hotfix in /usr/local/lib/python3.10/dist-packages (from datasets) (0.6)\n",
39
+ "Requirement already satisfied: dill<0.3.9,>=0.3.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (0.3.8)\n",
40
+ "Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from datasets) (2.0.3)\n",
41
+ "Requirement already satisfied: xxhash in /usr/local/lib/python3.10/dist-packages (from datasets) (3.4.1)\n",
42
+ "Requirement already satisfied: multiprocess in /usr/local/lib/python3.10/dist-packages (from datasets) (0.70.16)\n",
43
+ "Requirement already satisfied: fsspec[http]<=2024.3.1,>=2023.1.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (2023.6.0)\n",
44
+ "Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from datasets) (3.9.5)\n",
45
+ "Requirement already satisfied: wcwidth<0.3.0,>=0.2.12 in /usr/local/lib/python3.10/dist-packages (from ftfy) (0.2.13)\n",
46
+ "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.3.1)\n",
47
+ "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (23.2.0)\n",
48
+ "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.4.1)\n",
49
+ "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (6.0.5)\n",
50
+ "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.9.4)\n",
51
+ "Requirement already satisfied: async-timeout<5.0,>=4.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (4.0.3)\n",
52
+ "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.20.2->diffusers) (4.11.0)\n",
53
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->diffusers) (3.3.2)\n",
54
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->diffusers) (3.7)\n",
55
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->diffusers) (2.0.7)\n",
56
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->diffusers) (2024.2.2)\n",
57
+ "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (1.12)\n",
58
+ "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (3.3)\n",
59
+ "Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (3.1.4)\n",
60
+ "Requirement already satisfied: nvidia-cuda-nvrtc-cu12==12.1.105 in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (12.1.105)\n",
61
+ "Requirement already satisfied: nvidia-cuda-runtime-cu12==12.1.105 in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (12.1.105)\n",
62
+ "Requirement already satisfied: nvidia-cuda-cupti-cu12==12.1.105 in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (12.1.105)\n",
63
+ "Requirement already satisfied: nvidia-cudnn-cu12==8.9.2.26 in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (8.9.2.26)\n",
64
+ "Requirement already satisfied: nvidia-cublas-cu12==12.1.3.1 in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (12.1.3.1)\n",
65
+ "Requirement already satisfied: nvidia-cufft-cu12==11.0.2.54 in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (11.0.2.54)\n",
66
+ "Requirement already satisfied: nvidia-curand-cu12==10.3.2.106 in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (10.3.2.106)\n",
67
+ "Requirement already satisfied: nvidia-cusolver-cu12==11.4.5.107 in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (11.4.5.107)\n",
68
+ "Requirement already satisfied: nvidia-cusparse-cu12==12.1.0.106 in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (12.1.0.106)\n",
69
+ "Requirement already satisfied: nvidia-nccl-cu12==2.19.3 in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (2.19.3)\n",
70
+ "Requirement already satisfied: nvidia-nvtx-cu12==12.1.105 in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (12.1.105)\n",
71
+ "Requirement already satisfied: triton==2.2.0 in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (2.2.0)\n",
72
+ "Requirement already satisfied: nvidia-nvjitlink-cu12 in /usr/local/lib/python3.10/dist-packages (from nvidia-cusolver-cu12==11.4.5.107->torch>=1.10.0->accelerate) (12.4.127)\n",
73
+ "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.10/dist-packages (from importlib-metadata->diffusers) (3.18.1)\n",
74
+ "Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2.8.2)\n",
75
+ "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2023.4)\n",
76
+ "Requirement already satisfied: tzdata>=2022.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2024.1)\n",
77
+ "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.2->pandas->datasets) (1.16.0)\n",
78
+ "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch>=1.10.0->accelerate) (2.1.5)\n",
79
+ "Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch>=1.10.0->accelerate) (1.3.0)\n"
80
+ ]
81
+ }
82
+ ],
83
+ "source": [
84
+ "!pip install --upgrade diffusers transformers accelerate datasets ftfy\n"
85
+ ]
86
+ },
87
+ {
88
+ "cell_type": "code",
89
+ "source": [
90
+ "!git clone https://github.com/huggingface/diffusers"
91
+ ],
92
+ "metadata": {
93
+ "colab": {
94
+ "base_uri": "https://localhost:8080/"
95
+ },
96
+ "id": "2bPaAoIaYzfU",
97
+ "outputId": "4e3fbf5e-6446-4238-e33f-9e3ed7c3a551"
98
+ },
99
+ "execution_count": 2,
100
+ "outputs": [
101
+ {
102
+ "output_type": "stream",
103
+ "name": "stdout",
104
+ "text": [
105
+ "fatal: destination path 'diffusers' already exists and is not an empty directory.\n"
106
+ ]
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ "cell_type": "code",
112
+ "source": [
113
+ "!git clone https://github.com/justinpinkney/stable-diffusion"
114
+ ],
115
+ "metadata": {
116
+ "colab": {
117
+ "base_uri": "https://localhost:8080/"
118
+ },
119
+ "id": "FPqSeH6WNhI-",
120
+ "outputId": "d2c3fb54-4946-4614-f173-5735ab2750de"
121
+ },
122
+ "execution_count": 3,
123
+ "outputs": [
124
+ {
125
+ "output_type": "stream",
126
+ "name": "stdout",
127
+ "text": [
128
+ "fatal: destination path 'stable-diffusion' already exists and is not an empty directory.\n"
129
+ ]
130
+ }
131
+ ]
132
+ },
133
+ {
134
+ "cell_type": "code",
135
+ "source": [
136
+ "!pip install git+https://github.com/huggingface/diffusers"
137
+ ],
138
+ "metadata": {
139
+ "colab": {
140
+ "base_uri": "https://localhost:8080/"
141
+ },
142
+ "id": "JJ4za0BLZIbB",
143
+ "outputId": "e202f605-20f8-4934-d3fe-8c56ec2228c1"
144
+ },
145
+ "execution_count": 4,
146
+ "outputs": [
147
+ {
148
+ "output_type": "stream",
149
+ "name": "stdout",
150
+ "text": [
151
+ "Collecting git+https://github.com/huggingface/diffusers\n",
152
+ " Cloning https://github.com/huggingface/diffusers to /tmp/pip-req-build-suvai_up\n",
153
+ " Running command git clone --filter=blob:none --quiet https://github.com/huggingface/diffusers /tmp/pip-req-build-suvai_up\n",
154
+ " Resolved https://github.com/huggingface/diffusers to commit 5ed3abd371d558457cece4a1dad63f87c6694508\n",
155
+ " Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
156
+ " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
157
+ " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
158
+ "Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.10/dist-packages (from diffusers==0.28.0.dev0) (7.1.0)\n",
159
+ "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from diffusers==0.28.0.dev0) (3.14.0)\n",
160
+ "Requirement already satisfied: huggingface-hub>=0.20.2 in /usr/local/lib/python3.10/dist-packages (from diffusers==0.28.0.dev0) (0.23.0)\n",
161
+ "Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from diffusers==0.28.0.dev0) (1.25.2)\n",
162
+ "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from diffusers==0.28.0.dev0) (2023.12.25)\n",
163
+ "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from diffusers==0.28.0.dev0) (2.31.0)\n",
164
+ "Requirement already satisfied: safetensors>=0.3.1 in /usr/local/lib/python3.10/dist-packages (from diffusers==0.28.0.dev0) (0.4.3)\n",
165
+ "Requirement already satisfied: Pillow in /usr/local/lib/python3.10/dist-packages (from diffusers==0.28.0.dev0) (9.4.0)\n",
166
+ "Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.20.2->diffusers==0.28.0.dev0) (2023.6.0)\n",
167
+ "Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.20.2->diffusers==0.28.0.dev0) (24.0)\n",
168
+ "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.20.2->diffusers==0.28.0.dev0) (6.0.1)\n",
169
+ "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.20.2->diffusers==0.28.0.dev0) (4.66.4)\n",
170
+ "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.20.2->diffusers==0.28.0.dev0) (4.11.0)\n",
171
+ "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.10/dist-packages (from importlib-metadata->diffusers==0.28.0.dev0) (3.18.1)\n",
172
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->diffusers==0.28.0.dev0) (3.3.2)\n",
173
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->diffusers==0.28.0.dev0) (3.7)\n",
174
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->diffusers==0.28.0.dev0) (2.0.7)\n",
175
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->diffusers==0.28.0.dev0) (2024.2.2)\n"
176
+ ]
177
+ }
178
+ ]
179
+ },
180
+ {
181
+ "cell_type": "code",
182
+ "execution_count": 5,
183
+ "metadata": {
184
+ "colab": {
185
+ "base_uri": "https://localhost:8080/"
186
+ },
187
+ "id": "wg0ajn98PVFX",
188
+ "outputId": "95aacefb-4a6c-4e8b-c8aa-26d7357d4f19"
189
+ },
190
+ "outputs": [
191
+ {
192
+ "output_type": "stream",
193
+ "name": "stdout",
194
+ "text": [
195
+ "\n",
196
+ " _| _| _| _| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _|_|_|_| _|_| _|_|_| _|_|_|_|\n",
197
+ " _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _|\n",
198
+ " _|_|_|_| _| _| _| _|_| _| _|_| _| _| _| _| _| _|_| _|_|_| _|_|_|_| _| _|_|_|\n",
199
+ " _| _| _| _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _|\n",
200
+ " _| _| _|_| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _| _| _| _|_|_| _|_|_|_|\n",
201
+ "\n",
202
+ " A token is already saved on your machine. Run `huggingface-cli whoami` to get more information or `huggingface-cli logout` if you want to log out.\n",
203
+ " Setting a new token will erase the existing one.\n",
204
+ " To login, `huggingface_hub` requires a token generated from https://huggingface.co/settings/tokens .\n",
205
+ "Enter your token (input will not be visible): \n",
206
+ "Add token as git credential? (Y/n) n\n",
207
+ "Token is valid (permission: write).\n",
208
+ "Your token has been saved to /root/.cache/huggingface/token\n",
209
+ "Login successful\n"
210
+ ]
211
+ }
212
+ ],
213
+ "source": [
214
+ "!huggingface-cli login"
215
+ ]
216
+ },
217
+ {
218
+ "cell_type": "code",
219
+ "execution_count": null,
220
+ "metadata": {
221
+ "colab": {
222
+ "base_uri": "https://localhost:8080/"
223
+ },
224
+ "id": "I24e4zV3PYEv",
225
+ "outputId": "08b1b608-6b65-4780-ddb3-8fa00abff159"
226
+ },
227
+ "outputs": [
228
+ {
229
+ "output_type": "stream",
230
+ "name": "stdout",
231
+ "text": [
232
+ "The following values were not passed to `accelerate launch` and had defaults used instead:\n",
233
+ "\t`--num_processes` was set to a value of `0`\n",
234
+ "\t`--num_machines` was set to a value of `1`\n",
235
+ "\t`--mixed_precision` was set to a value of `'no'`\n",
236
+ "\t`--dynamo_backend` was set to a value of `'no'`\n",
237
+ "To avoid this warning pass in values for each of the problematic parameters or run `accelerate config`.\n",
238
+ "2024-05-09 17:37:40.648889: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n",
239
+ "2024-05-09 17:37:40.648973: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n",
240
+ "2024-05-09 17:37:40.659856: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n",
241
+ "2024-05-09 17:37:43.315644: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n",
242
+ "05/09/2024 17:37:44 - INFO - __main__ - Distributed environment: NO\n",
243
+ "Num processes: 1\n",
244
+ "Process index: 0\n",
245
+ "Local process index: 0\n",
246
+ "Device: cpu\n",
247
+ "\n",
248
+ "Mixed precision type: fp16\n",
249
+ "\n",
250
+ "{'thresholding', 'dynamic_thresholding_ratio', 'prediction_type', 'sample_max_value', 'rescale_betas_zero_snr', 'clip_sample_range', 'variance_type', 'timestep_spacing'} was not found in config. Values will be initialized to default values.\n",
251
+ "/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.\n",
252
+ " warnings.warn(\n",
253
+ "{'latents_mean', 'norm_num_groups', 'latents_std', 'force_upcast'} was not found in config. Values will be initialized to default values.\n",
254
+ "{'dropout', 'resnet_time_scale_shift', 'encoder_hid_dim', 'mid_block_type', 'attention_type', 'addition_time_embed_dim', 'projection_class_embeddings_input_dim', 'only_cross_attention', 'time_cond_proj_dim', 'mid_block_only_cross_attention', 'class_embed_type', 'num_class_embeds', 'addition_embed_type_num_heads', 'resnet_out_scale_factor', 'dual_cross_attention', 'time_embedding_act_fn', 'transformer_layers_per_block', 'time_embedding_dim', 'resnet_skip_time_act', 'encoder_hid_dim_type', 'conv_in_kernel', 'num_attention_heads', 'use_linear_projection', 'time_embedding_type', 'reverse_transformer_layers_per_block', 'cross_attention_norm', 'addition_embed_type', 'class_embeddings_concat', 'timestep_post_act', 'conv_out_kernel', 'upcast_attention'} was not found in config. Values will be initialized to default values.\n",
255
+ "{'dropout', 'resnet_time_scale_shift', 'encoder_hid_dim', 'mid_block_type', 'attention_type', 'addition_time_embed_dim', 'projection_class_embeddings_input_dim', 'only_cross_attention', 'time_cond_proj_dim', 'mid_block_only_cross_attention', 'class_embed_type', 'num_class_embeds', 'addition_embed_type_num_heads', 'resnet_out_scale_factor', 'dual_cross_attention', 'time_embedding_act_fn', 'transformer_layers_per_block', 'time_embedding_dim', 'resnet_skip_time_act', 'encoder_hid_dim_type', 'conv_in_kernel', 'num_attention_heads', 'use_linear_projection', 'time_embedding_type', 'reverse_transformer_layers_per_block', 'cross_attention_norm', 'addition_embed_type', 'class_embeddings_concat', 'timestep_post_act', 'conv_out_kernel', 'upcast_attention'} was not found in config. Values will be initialized to default values.\n",
256
+ "Resolving data files: 100% 49/49 [00:01<00:00, 44.81it/s]\n",
257
+ "05/09/2024 17:38:08 - INFO - __main__ - ***** Running training *****\n",
258
+ "05/09/2024 17:38:08 - INFO - __main__ - Num examples = 48\n",
259
+ "05/09/2024 17:38:08 - INFO - __main__ - Num Epochs = 334\n",
260
+ "05/09/2024 17:38:08 - INFO - __main__ - Instantaneous batch size per device = 8\n",
261
+ "05/09/2024 17:38:08 - INFO - __main__ - Total train batch size (w. parallel, distributed & accumulation) = 16\n",
262
+ "05/09/2024 17:38:08 - INFO - __main__ - Gradient Accumulation steps = 2\n",
263
+ "05/09/2024 17:38:08 - INFO - __main__ - Total optimization steps = 1000\n",
264
+ "Steps: 0% 0/1000 [00:00<?, ?it/s]"
265
+ ]
266
+ }
267
+ ],
268
+ "source": [
269
+ "!accelerate launch diffusers/examples/text_to_image/train_text_to_image.py \\\n",
270
+ " --pretrained_model_name_or_path=\"CompVis/stable-diffusion-v1-4\" \\\n",
271
+ " --dataset_name=\"joshcarp/noor-dataset\" \\\n",
272
+ " --use_ema \\\n",
273
+ " --resolution=128 --center_crop --random_flip \\\n",
274
+ " --train_batch_size=8 \\\n",
275
+ " --gradient_accumulation_steps=2 \\\n",
276
+ " --gradient_checkpointing \\\n",
277
+ " --mixed_precision=\"fp16\" \\\n",
278
+ " --max_train_steps=1000 \\\n",
279
+ " --learning_rate=1e-05 \\\n",
280
+ " --max_grad_norm=1 \\\n",
281
+ " --lr_scheduler=\"constant\" --lr_warmup_steps=0 \\\n",
282
+ " --output_dir=\"noor-generator\""
283
+ ]
284
+ }
285
+ ],
286
+ "metadata": {
287
+ "accelerator": "TPU",
288
+ "colab": {
289
+ "provenance": [],
290
+ "machine_shape": "hm"
291
+ },
292
+ "kernelspec": {
293
+ "display_name": "Python 3",
294
+ "name": "python3"
295
+ },
296
+ "language_info": {
297
+ "name": "python"
298
+ }
299
+ },
300
+ "nbformat": 4,
301
+ "nbformat_minor": 0
302
+ }