recoilme commited on
Commit
afd5c53
·
1 Parent(s): 770e065
samples/unet_192x320_0.jpg CHANGED

Git LFS Details

  • SHA256: 8a71bd8d8646523f78bc20871d7e94dcbb1b4b0dbb7b2aeaf753f694acf60578
  • Pointer size: 131 Bytes
  • Size of remote file: 140 kB

Git LFS Details

  • SHA256: 529cc2c37207c96c321216e2919c49c90668d90988b687ced581e7fc2cca6726
  • Pointer size: 131 Bytes
  • Size of remote file: 117 kB
samples/unet_256x320_0.jpg CHANGED

Git LFS Details

  • SHA256: e210b71c2e5c95f37c8543d8b85295f09a46468458baa7c081d57e693d748b4b
  • Pointer size: 131 Bytes
  • Size of remote file: 193 kB

Git LFS Details

  • SHA256: da403218ede7d26ce2c796757ed945c2c2d937d1dde0d0ef158a636c7c52b650
  • Pointer size: 131 Bytes
  • Size of remote file: 153 kB
samples/unet_320x192_0.jpg CHANGED

Git LFS Details

  • SHA256: 473a6ef9bffaeceb7d937df5a37c989de5603fa1f979d57a2fcdf72edc17ebb2
  • Pointer size: 131 Bytes
  • Size of remote file: 160 kB

Git LFS Details

  • SHA256: 32605c386aaa3bf2a1ca69001124f1377422b7db8c052f56416ccc55c19a6f47
  • Pointer size: 131 Bytes
  • Size of remote file: 149 kB
samples/unet_320x256_0.jpg CHANGED

Git LFS Details

  • SHA256: 0eb7cf4a04e77c940c90b56e3ea65c253d9e8db03e504ad0e253410932a50b10
  • Pointer size: 130 Bytes
  • Size of remote file: 50.3 kB

Git LFS Details

  • SHA256: e769610314afa474bb559903c5764fae558e7a87fdef13af16d46d2aea167bea
  • Pointer size: 130 Bytes
  • Size of remote file: 89.7 kB
samples/unet_320x320_0.jpg CHANGED

Git LFS Details

  • SHA256: 1d9a855e6dda1bc5cf43e488174d421316d02ae4e652011f4a8bde668090bb5e
  • Pointer size: 131 Bytes
  • Size of remote file: 177 kB

Git LFS Details

  • SHA256: fda4cc670a75fd934b6f9b98987c8a15c7ac6af58c4eda8b5058fe0b5ce943b9
  • Pointer size: 131 Bytes
  • Size of remote file: 107 kB
src/sd15_2048.ipynb CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:057785145ba468215062bf2b6ea7dca9aa3186f0f010215eb00e4739bf213e17
3
- size 51250
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0e269bc293298ebb305b766c45576fc19bf7f5cbba3891f86fe0eb098941a6d9
3
+ size 64886
test.ipynb CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:25096d7d566bf784726fbdbd762781a0ff0a25523554272c3c426989633dc969
3
- size 5145945
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:58a27239863602451840062946b9930543b8b59bc0a7abaa59e613df0d216f2f
3
+ size 5214545
text_encoder/config.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:d3bc4fb7ed18b75101464c8e6b93846ad0e626fa566592083d18866743d4893d
3
- size 1354
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:84c37ee8025b892ca9210635a38228f4650373ad5e59628af66d344f967ce64e
3
+ size 1360
text_encoder/generation_config.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8b9afb365eaab1c8fc2395f618067ee2307b9821e207f12c5c52cf371a14b0e0
3
+ size 121
text_encoder/model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:fbbfc1bd7cdbaa8f0759d8d3c00d8a91bf9af50093fc3c7204c1e3e2c5fe3723
3
- size 3441183752
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:08a190beb6e66815d00f15994ca740b1cbe78ee6f5b0c4d682855c9219451a5a
3
+ size 3441185296
tokenizer/chat_template.jinja CHANGED
@@ -1,7 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  {%- if tools %}
2
  {{- '<|im_start|>system\n' }}
3
  {%- if messages[0].role == 'system' %}
4
- {{- messages[0].content + '\n\n' }}
5
  {%- endif %}
6
  {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
7
  {%- for tool in tools %}
@@ -11,23 +36,22 @@
11
  {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
12
  {%- else %}
13
  {%- if messages[0].role == 'system' %}
14
- {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
15
  {%- endif %}
16
  {%- endif %}
17
  {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
18
  {%- for message in messages[::-1] %}
19
  {%- set index = (messages|length - 1) - loop.index0 %}
20
- {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
21
- {%- set ns.multi_step_tool = false %}
22
- {%- set ns.last_query_index = index %}
 
 
 
23
  {%- endif %}
24
  {%- endfor %}
25
  {%- for message in messages %}
26
- {%- if message.content is string %}
27
- {%- set content = message.content %}
28
- {%- else %}
29
- {%- set content = '' %}
30
- {%- endif %}
31
  {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
32
  {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
33
  {%- elif message.role == "assistant" %}
@@ -82,8 +106,5 @@
82
  {%- endif %}
83
  {%- endfor %}
84
  {%- if add_generation_prompt %}
85
- {{- '<|im_start|>assistant\n' }}
86
- {%- if enable_thinking is defined and enable_thinking is false %}
87
- {{- '<think>\n\n</think>\n\n' }}
88
- {%- endif %}
89
- {%- endif %}
 
1
+ {%- set image_count = namespace(value=0) %}
2
+ {%- set video_count = namespace(value=0) %}
3
+ {%- macro render_content(content, do_vision_count) %}
4
+ {%- if content is string %}
5
+ {{- content }}
6
+ {%- else %}
7
+ {%- for item in content %}
8
+ {%- if 'image' in item or 'image_url' in item or item.type == 'image' %}
9
+ {%- if do_vision_count %}
10
+ {%- set image_count.value = image_count.value + 1 %}
11
+ {%- endif %}
12
+ {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}
13
+ <|vision_start|><|image_pad|><|vision_end|>
14
+ {%- elif 'video' in item or item.type == 'video' %}
15
+ {%- if do_vision_count %}
16
+ {%- set video_count.value = video_count.value + 1 %}
17
+ {%- endif %}
18
+ {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}
19
+ <|vision_start|><|video_pad|><|vision_end|>
20
+ {%- elif 'text' in item %}
21
+ {{- item.text }}
22
+ {%- endif %}
23
+ {%- endfor %}
24
+ {%- endif %}
25
+ {%- endmacro %}
26
  {%- if tools %}
27
  {{- '<|im_start|>system\n' }}
28
  {%- if messages[0].role == 'system' %}
29
+ {{- render_content(messages[0].content, false) + '\n\n' }}
30
  {%- endif %}
31
  {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
32
  {%- for tool in tools %}
 
36
  {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
37
  {%- else %}
38
  {%- if messages[0].role == 'system' %}
39
+ {{- '<|im_start|>system\n' + render_content(messages[0].content, false) + '<|im_end|>\n' }}
40
  {%- endif %}
41
  {%- endif %}
42
  {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
43
  {%- for message in messages[::-1] %}
44
  {%- set index = (messages|length - 1) - loop.index0 %}
45
+ {%- if ns.multi_step_tool and message.role == "user" %}
46
+ {%- set content = render_content(message.content, false) %}
47
+ {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}
48
+ {%- set ns.multi_step_tool = false %}
49
+ {%- set ns.last_query_index = index %}
50
+ {%- endif %}
51
  {%- endif %}
52
  {%- endfor %}
53
  {%- for message in messages %}
54
+ {%- set content = render_content(message.content, True) %}
 
 
 
 
55
  {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
56
  {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
57
  {%- elif message.role == "assistant" %}
 
106
  {%- endif %}
107
  {%- endfor %}
108
  {%- if add_generation_prompt %}
109
+ {{- '<|im_start|>assistant\n<think>\n' }}
110
+ {%- endif %}
 
 
 
tokenizer/tokenizer_config.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:443bfa629eb16387a12edbf92a76f6a6f10b2af3b53d87ba1550adfcf45f7fa0
3
  size 5404
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:355f2b4e5bad7b01f11ef6cb68ebc176f61b95c3276092ea225b1bea0e01e95c
3
  size 5404
train.py CHANGED
@@ -29,7 +29,7 @@ from transformers import AutoTokenizer, AutoModel
29
  # --------------------------- Параметры ---------------------------
30
  ds_path = "/workspace/sdxs/datasets/mjnj"
31
  project = "unet"
32
- batch_size = 48
33
  base_learning_rate = 4e-5 #2.7e-5
34
  min_learning_rate = 1e-5 #2.7e-5
35
  num_epochs = 50
 
29
  # --------------------------- Параметры ---------------------------
30
  ds_path = "/workspace/sdxs/datasets/mjnj"
31
  project = "unet"
32
+ batch_size = 24
33
  base_learning_rate = 4e-5 #2.7e-5
34
  min_learning_rate = 1e-5 #2.7e-5
35
  num_epochs = 50
unet/config.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:78d4828222ad3a8cddeadf895d9a3afce5c95869d374458dc2c7e5d3b9bf9864
3
  size 1813
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:526c074225e5cd6567d513a6fdfbbe27dacfe3580843229bcdcf66f229bfaa7f
3
  size 1813
unet/diffusion_pytorch_model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6caf99add90edb56022eadfc609bc34fae5be12b152fd7822f3d0ac57ff37703
3
- size 3566239360
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:63bdfd6ba99237a331a64b494babcf5a1b463cad93178328e7e112f3c10488f3
3
+ size 4663712768
unet_sd15/config.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:78d4828222ad3a8cddeadf895d9a3afce5c95869d374458dc2c7e5d3b9bf9864
3
+ size 1813
unet_sd15/diffusion_pytorch_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:117b50c39c48aab6471ffee83429331794f90b825bacda4488a2a4aa7ed2ffa8
3
+ size 3566239360