3010
Browse files- README.md +30 -4
- src/dataset_sample.ipynb +2 -2
- src/merge.py +10 -0
- test.ipynb +2 -2
- train.py +5 -5
README.md
CHANGED
|
@@ -11,11 +11,37 @@ pipeline_tag: text-to-image
|
|
| 11 |
|
| 12 |
At AiArtLab, we strive to create a free, compact and fast model that can be trained on consumer graphics cards.
|
| 13 |
|
| 14 |
-
-
|
| 15 |
-
-
|
| 16 |
-
-
|
| 17 |
- The model was trained ~3 month on 4xRTX5090 on approximately 1+ million images with various resolutions and styles, including anime and realistic photos.
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
### Model Limitations:
|
| 20 |
- Limited concept coverage due to the small dataset.
|
| 21 |
|
|
@@ -41,6 +67,6 @@ BTC: 3JHv9Hb8kEW8zMAccdgCdZGfrHeMhH1rpN
|
|
| 41 |
[recoilme](https://t.me/recoilme)
|
| 42 |
|
| 43 |
|
| 44 |
-
##
|
| 45 |
|
| 46 |

|
|
|
|
| 11 |
|
| 12 |
At AiArtLab, we strive to create a free, compact and fast model that can be trained on consumer graphics cards.
|
| 13 |
|
| 14 |
+
- 1.5b UNet
|
| 15 |
+
- Qwen3-0.6b text encoder
|
| 16 |
+
- 16ch Simple VAE, which preserves details and anatomy.
|
| 17 |
- The model was trained ~3 month on 4xRTX5090 on approximately 1+ million images with various resolutions and styles, including anime and realistic photos.
|
| 18 |
|
| 19 |
+
### Example
|
| 20 |
+
|
| 21 |
+
```
|
| 22 |
+
import torch
|
| 23 |
+
from diffusers import DiffusionPipeline
|
| 24 |
+
|
| 25 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 26 |
+
dtype = torch.float16 if torch.cuda.is_available() else torch.float32
|
| 27 |
+
|
| 28 |
+
pipe_id = "AiArtLab/sdxs"
|
| 29 |
+
pipe = SdxsPipeline.from_pretrained(
|
| 30 |
+
pipe_id,
|
| 31 |
+
torch_dtype=dtype,
|
| 32 |
+
trust_remote_code=True
|
| 33 |
+
).to(device)
|
| 34 |
+
|
| 35 |
+
prompt = "girl, smiling, red eyes, blue hair, white shirt"
|
| 36 |
+
negative_prompt="low quality, bad quality"
|
| 37 |
+
image = pipe(
|
| 38 |
+
prompt=prompt,
|
| 39 |
+
negative_prompt = negative_prompt,
|
| 40 |
+
).images[0]
|
| 41 |
+
|
| 42 |
+
image.show(image)
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
### Model Limitations:
|
| 46 |
- Limited concept coverage due to the small dataset.
|
| 47 |
|
|
|
|
| 67 |
[recoilme](https://t.me/recoilme)
|
| 68 |
|
| 69 |
|
| 70 |
+
## More examples
|
| 71 |
|
| 72 |

|
src/dataset_sample.ipynb
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0464770415073c7af8d9a44792c39d89e49d48c667d3c37d52e255e92f80fb57
|
| 3 |
+
size 8209446
|
src/merge.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import shutil
|
| 2 |
+
from datasets import load_from_disk, concatenate_datasets
|
| 3 |
+
|
| 4 |
+
a = load_from_disk("/workspace/sdxs/datasets/mjnj_640")
|
| 5 |
+
b = load_from_disk("/workspace/sdxs/datasets/d23_640")
|
| 6 |
+
merged = concatenate_datasets([a, b])
|
| 7 |
+
|
| 8 |
+
merged.save_to_disk("/workspace/sdxs/datasets/mjnj_640_merged")
|
| 9 |
+
shutil.rmtree("/workspace/sdxs/datasets/mjnj_640")
|
| 10 |
+
shutil.move("/workspace/sdxs/datasets/mjnj_640_merged", "/workspace/sdxs/datasets/mjnj_640")
|
test.ipynb
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:79e3d9e6dd5f0879cb0aa79d4cd97dd23352c9d807e9f4a593ebc234322e668c
|
| 3 |
+
size 5563216
|
train.py
CHANGED
|
@@ -26,16 +26,16 @@ import torch.nn.functional as F
|
|
| 26 |
from collections import deque
|
| 27 |
|
| 28 |
# --------------------------- Параметры ---------------------------
|
| 29 |
-
ds_path = "/workspace/sdxs3d/datasets/
|
| 30 |
project = "unet"
|
| 31 |
batch_size = 48
|
| 32 |
base_learning_rate = 5e-5
|
| 33 |
-
min_learning_rate =
|
| 34 |
num_epochs = 40
|
| 35 |
# samples/save per epoch
|
| 36 |
-
sample_interval_share =
|
| 37 |
-
use_wandb =
|
| 38 |
-
use_comet_ml =
|
| 39 |
save_model = True
|
| 40 |
use_decay = True
|
| 41 |
fbp = False # fused backward pass
|
|
|
|
| 26 |
from collections import deque
|
| 27 |
|
| 28 |
# --------------------------- Параметры ---------------------------
|
| 29 |
+
ds_path = "/workspace/sdxs3d/datasets/640"
|
| 30 |
project = "unet"
|
| 31 |
batch_size = 48
|
| 32 |
base_learning_rate = 5e-5
|
| 33 |
+
min_learning_rate = 1e-5
|
| 34 |
num_epochs = 40
|
| 35 |
# samples/save per epoch
|
| 36 |
+
sample_interval_share = 3
|
| 37 |
+
use_wandb = True
|
| 38 |
+
use_comet_ml = False
|
| 39 |
save_model = True
|
| 40 |
use_decay = True
|
| 41 |
fbp = False # fused backward pass
|