You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What's the problem, is this normal?The program keeps generating images in synth/images and synth/glyphs, and then keeps showing 'not a valid generation', is it something I haven't set up?
Hi, this is not an error. The code prints this error to indicate that some generations are not valid. All invalid generation is not included in the result folder.
Hi, this is not an error. The code prints this error to indicate that some generations are not valid. All invalid generation is not included in the result folder.
Hi, this is not an error. The code prints this error to indicate that some generations are not valid. All invalid generation is not included in the result folder.
Hello, excuse me. I would like to ask if the pictures produced during my training are all like this, and the progress is still at about 29%, may I ask where I set it wrong?
this is where I put runwayml/stable-diffusion-inpainting in
Hi, this is not an error. The code prints this error to indicate that some generations are not valid. All invalid generation is not included in the result folder.
Hello, excuse me. I would like to ask if the pictures produced during my training are all like this, and the progress is still at about 29%, may I ask where I set it wrong? this is where I put runwayml/stable-diffusion-inpainting in
Activity
Question406 commentedon Mar 4, 2024
Hi, this is not an error. The code prints this error to indicate that some generations are not valid. All invalid generation is not included in the result folder.
kd-scki3011 commentedon Mar 5, 2024
thanks!
kd-scki3011 commentedon Mar 5, 2024
Hello, excuse me. I would like to ask if the pictures produced during my training are all like this, and the progress is still at about 29%, may I ask where I set it wrong?
this is where I put runwayml/stable-diffusion-inpainting in
kd-scki3011 commentedon Mar 5, 2024
this is my config:
train on combination of all datas
data:
target: "src.trainers.WrappedDataModule"
batch_size: 1
scene_data: ocr-dataset/
synth_data: ocr-dataset/synth/
train:
size: 256
max_num: 2000000 # diffly choose this number
augconf:
synth:
center: 0.1
pad: false
scene:
expand_mask:
center_mask: 0.6
additional_mask: 0.4
crop:
mask_image_ratio: 15
rotate:
cat_prob: [1, 0, 0]
angle_list: [-15, -30, -45, -60, -90, 15, 30, 45, 60, 90]
rotate_range: 90
validation:
size: 256
# max_num: 6400 # diffly choose this number
augconf:
synth:
center: 1.
pad: false
scene:
expand_mask:
center_mask: 0.
additional_mask: 0.
crop:
mask_image_ratio: 30
rotate:
cat_prob: [1, 0, 0]
angle_list: [-15, -30, -45, -60, -90, 15, 30, 45, 60, 90]
rotate_range: 90
model:
source: raw
target: "src.trainers.CharInpaintModelWrapper"
pretrained_model_path: runwayml/stable-diffusion-inpainting
loss_type: MaskMSELoss
loss_alpha: 5
base_learning_rate: 5.0e-5
precision: 16
weight_decay: 0.0
adam_epsilon: 1.0e-8
freeze_char_embedder: false
optimize_vae: false
vae:
tokenizer:
model_max_length: 20
char_tokenizer:
pretrained_path: checkpoints/chartokenizer
pad_token: " "
unk_token: " "
model_max_length: 20
char_embedder:
vocab_size: 95 # by default
embedding_dim: 32
max_length: 20
padding_idx: 0
attention_head_dim: 2
unet:
attention_head_dim: { "text": 8, "char": 2 }
cross_attention_dim: { "text": 768, "char": 32 }
noise_scheduler: diffusers.DDIMScheduler
lightning:
logger:
callbacks:
checkpoint_callback:
params:
save_top_k: -1
image_logger:
target: "src.trainers.CharInpaintImageLogger"
params:
# train_batch_frequency: 2400
# valid_batch_frequency: 500
train_batch_frequency: 2
valid_batch_frequency: 2
disable_wandb: true
generation_kwargs:
num_inference_steps: 30
num_sample_per_image: 3
guidance_scale: 7.5
seed: 42
trainer:
accelerator: gpu
devices: [0]
strategy: ddp
amp_backend: native
log_every_n_steps: 16 # this is global step
precision: 16
max_epochs: 15
check_val_every_n_epoch: 1
accumulate_grad_batches: 8
gradient_clip_val: 3.
gradient_clip_algorithm: norm
benchmark: true