Instructions to use AiArtLab/sdxs-1b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use AiArtLab/sdxs-1b with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("AiArtLab/sdxs-1b", dtype=torch.bfloat16, device_map="cuda") prompt = "sdxs-1b" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
2604
Browse files- samples/unet_384x704_0.jpg +2 -2
- samples/unet_416x704_0.jpg +2 -2
- samples/unet_448x704_0.jpg +2 -2
- samples/unet_480x704_0.jpg +2 -2
- samples/unet_512x704_0.jpg +2 -2
- samples/unet_544x704_0.jpg +2 -2
- samples/unet_576x704_0.jpg +2 -2
- samples/unet_608x704_0.jpg +2 -2
- samples/unet_640x704_0.jpg +2 -2
- samples/unet_672x704_0.jpg +2 -2
- samples/unet_704x384_0.jpg +2 -2
- samples/unet_704x416_0.jpg +2 -2
- samples/unet_704x448_0.jpg +2 -2
- samples/unet_704x480_0.jpg +2 -2
- samples/unet_704x512_0.jpg +2 -2
- samples/unet_704x544_0.jpg +2 -2
- samples/unet_704x576_0.jpg +2 -2
- samples/unet_704x608_0.jpg +2 -2
- samples/unet_704x640_0.jpg +2 -2
- samples/unet_704x672_0.jpg +2 -2
- samples/unet_704x704_0.jpg +2 -2
- train.py +4 -3
- unet/config.json +1 -1
- unet/diffusion_pytorch_model.safetensors +2 -2
samples/unet_384x704_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_416x704_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_448x704_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_480x704_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_512x704_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_544x704_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_576x704_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_608x704_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_640x704_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_672x704_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_704x384_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_704x416_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_704x448_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_704x480_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_704x512_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_704x544_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_704x576_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_704x608_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_704x640_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_704x672_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_704x704_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
train.py
CHANGED
|
@@ -717,8 +717,9 @@ for epoch in range(start_epoch, start_epoch + num_epochs):
|
|
| 717 |
noise = torch.randn_like(latents, dtype=latents.dtype)
|
| 718 |
|
| 719 |
# 3. Время t (сэмплим, как и раньше, но чуть сжимаем края)
|
| 720 |
-
u = torch.rand(latents.shape[0], device=latents.device, dtype=latents.dtype)
|
| 721 |
-
t = u * (1 - 2 * 1e-5) + 1e-5 # Теперь t строго в (0.00001 ... 0.99999)
|
|
|
|
| 722 |
# интерполяция между x0 и шумом
|
| 723 |
noisy_latents = (1.0 - t.view(-1, 1, 1, 1)) * latents + t.view(-1, 1, 1, 1) * noise
|
| 724 |
# делаем integer timesteps для UNet
|
|
@@ -833,4 +834,4 @@ accelerator.free_memory()
|
|
| 833 |
if torch.distributed.is_initialized():
|
| 834 |
torch.distributed.destroy_process_group()
|
| 835 |
|
| 836 |
-
print("Готово!")
|
|
|
|
| 717 |
noise = torch.randn_like(latents, dtype=latents.dtype)
|
| 718 |
|
| 719 |
# 3. Время t (сэмплим, как и раньше, но чуть сжимаем края)
|
| 720 |
+
#u = torch.rand(latents.shape[0], device=latents.device, dtype=latents.dtype)
|
| 721 |
+
#t = u * (1 - 2 * 1e-5) + 1e-5 # Теперь t строго в (0.00001 ... 0.99999)
|
| 722 |
+
t = torch.sigmoid(torch.randn(latents.shape[0], device=latents.device, dtype=latents.dtype))
|
| 723 |
# интерполяция между x0 и шумом
|
| 724 |
noisy_latents = (1.0 - t.view(-1, 1, 1, 1)) * latents + t.view(-1, 1, 1, 1) * noise
|
| 725 |
# делаем integer timesteps для UNet
|
|
|
|
| 834 |
if torch.distributed.is_initialized():
|
| 835 |
torch.distributed.destroy_process_group()
|
| 836 |
|
| 837 |
+
print("Готово!")
|
unet/config.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1879
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e4a3681d28d061b35b033d8cfcf2bd59105bafbc2335c3d5186a3d58cee4fff9
|
| 3 |
size 1879
|
unet/diffusion_pytorch_model.safetensors
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:de0e556bd49f281a4d02a92b253e33a8aa88eedfb7af9df2db500153ff9d1460
|
| 3 |
+
size 6420443856
|