2512
Browse files- samples/unet_384x768_0.jpg +2 -2
- samples/unet_416x768_0.jpg +2 -2
- samples/unet_448x768_0.jpg +2 -2
- samples/unet_480x768_0.jpg +2 -2
- samples/unet_512x768_0.jpg +2 -2
- samples/unet_544x768_0.jpg +2 -2
- samples/unet_576x768_0.jpg +2 -2
- samples/unet_608x768_0.jpg +2 -2
- samples/unet_640x768_0.jpg +2 -2
- samples/unet_672x768_0.jpg +2 -2
- samples/unet_704x768_0.jpg +2 -2
- samples/unet_736x768_0.jpg +2 -2
- samples/unet_768x384_0.jpg +2 -2
- samples/unet_768x416_0.jpg +2 -2
- samples/unet_768x448_0.jpg +2 -2
- samples/unet_768x480_0.jpg +2 -2
- samples/unet_768x512_0.jpg +2 -2
- samples/unet_768x544_0.jpg +2 -2
- samples/unet_768x576_0.jpg +2 -2
- samples/unet_768x608_0.jpg +2 -2
- samples/unet_768x640_0.jpg +2 -2
- samples/unet_768x672_0.jpg +2 -2
- samples/unet_768x704_0.jpg +2 -2
- samples/unet_768x736_0.jpg +2 -2
- samples/unet_768x768_0.jpg +2 -2
- train.py +7 -7
- unet/diffusion_pytorch_model.safetensors +1 -1
samples/unet_384x768_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_416x768_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_448x768_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_480x768_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_512x768_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_544x768_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_576x768_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_608x768_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_640x768_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_672x768_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_704x768_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_736x768_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_768x384_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_768x416_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_768x448_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_768x480_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_768x512_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_768x544_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_768x576_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_768x608_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_768x640_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_768x672_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_768x704_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_768x736_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
samples/unet_768x768_0.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
train.py
CHANGED
|
@@ -8,7 +8,7 @@ from torch.utils.data import DataLoader, Sampler
|
|
| 8 |
from torch.utils.data.distributed import DistributedSampler
|
| 9 |
from torch.optim.lr_scheduler import LambdaLR
|
| 10 |
from collections import defaultdict
|
| 11 |
-
from diffusers import UNet2DConditionModel, AutoencoderKL,AutoencoderKLFlux2
|
| 12 |
from accelerate import Accelerator
|
| 13 |
from datasets import load_from_disk
|
| 14 |
from tqdm import tqdm
|
|
@@ -32,7 +32,7 @@ project = "unet"
|
|
| 32 |
batch_size = 36
|
| 33 |
base_learning_rate = 2.7e-5
|
| 34 |
min_learning_rate = 1e-5 #2.7e-5
|
| 35 |
-
num_epochs =
|
| 36 |
sample_interval_share = 5
|
| 37 |
max_length = 192
|
| 38 |
use_wandb = True
|
|
@@ -49,11 +49,11 @@ comet_ml_api_key = "Agctp26mbqnoYrrlvQuKSTk6r"
|
|
| 49 |
comet_ml_workspace = "recoilme"
|
| 50 |
torch.backends.cuda.matmul.allow_tf32 = True
|
| 51 |
torch.backends.cudnn.allow_tf32 = True
|
| 52 |
-
torch.backends.cuda.enable_mem_efficient_sdp(False)
|
| 53 |
dtype = torch.float32
|
| 54 |
save_barrier = 1.01
|
| 55 |
warmup_percent = 0.01
|
| 56 |
-
percentile_clipping = 96 #97
|
| 57 |
betta2 = 0.999
|
| 58 |
eps = 1e-7
|
| 59 |
clip_grad_norm = 1.0
|
|
@@ -71,7 +71,7 @@ device = accelerator.device
|
|
| 71 |
# Параметры для диффузии
|
| 72 |
n_diffusion_steps = 40
|
| 73 |
samples_to_generate = 12
|
| 74 |
-
guidance_scale =
|
| 75 |
|
| 76 |
# Папки для сохранения результатов
|
| 77 |
generated_folder = "samples"
|
|
@@ -736,8 +736,8 @@ for epoch in range(start_epoch, start_epoch + num_epochs):
|
|
| 736 |
|
| 737 |
if global_step % sample_interval == 0:
|
| 738 |
# Передаем tuple (emb, mask) для негатива
|
| 739 |
-
if epoch % 10 == 0:
|
| 740 |
-
|
| 741 |
last_n = sample_interval
|
| 742 |
|
| 743 |
if save_model:
|
|
|
|
| 8 |
from torch.utils.data.distributed import DistributedSampler
|
| 9 |
from torch.optim.lr_scheduler import LambdaLR
|
| 10 |
from collections import defaultdict
|
| 11 |
+
from diffusers import UNet2DConditionModel, AutoencoderKL#,AutoencoderKLFlux2
|
| 12 |
from accelerate import Accelerator
|
| 13 |
from datasets import load_from_disk
|
| 14 |
from tqdm import tqdm
|
|
|
|
| 32 |
batch_size = 36
|
| 33 |
base_learning_rate = 2.7e-5
|
| 34 |
min_learning_rate = 1e-5 #2.7e-5
|
| 35 |
+
num_epochs = 20
|
| 36 |
sample_interval_share = 5
|
| 37 |
max_length = 192
|
| 38 |
use_wandb = True
|
|
|
|
| 49 |
comet_ml_workspace = "recoilme"
|
| 50 |
torch.backends.cuda.matmul.allow_tf32 = True
|
| 51 |
torch.backends.cudnn.allow_tf32 = True
|
| 52 |
+
#torch.backends.cuda.enable_mem_efficient_sdp(False)
|
| 53 |
dtype = torch.float32
|
| 54 |
save_barrier = 1.01
|
| 55 |
warmup_percent = 0.01
|
| 56 |
+
percentile_clipping = 95 #96 #97
|
| 57 |
betta2 = 0.999
|
| 58 |
eps = 1e-7
|
| 59 |
clip_grad_norm = 1.0
|
|
|
|
| 71 |
# Параметры для диффузии
|
| 72 |
n_diffusion_steps = 40
|
| 73 |
samples_to_generate = 12
|
| 74 |
+
guidance_scale = 4
|
| 75 |
|
| 76 |
# Папки для сохранения результатов
|
| 77 |
generated_folder = "samples"
|
|
|
|
| 736 |
|
| 737 |
if global_step % sample_interval == 0:
|
| 738 |
# Передаем tuple (emb, mask) для негатива
|
| 739 |
+
#if epoch % 10 == 0:
|
| 740 |
+
generate_and_save_samples(fixed_samples, (uncond_emb, uncond_mask), global_step)
|
| 741 |
last_n = sample_interval
|
| 742 |
|
| 743 |
if save_model:
|
unet/diffusion_pytorch_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 7444321360
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:798a8bad743e0f338c462ffc5939c695367beacc54006359f8cf4a52e3340c3f
|
| 3 |
size 7444321360
|