Skip to content

Commit

Permalink
data added with yaml file
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyazomato committed Feb 14, 2023
1 parent 4ac995b commit 768d170
Show file tree
Hide file tree
Showing 2,998 changed files with 138 additions and 0 deletions.
137 changes: 137 additions & 0 deletions configs/stable-diffusion/food_images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
model:
base_learning_rate: 1.0e-04
target: ldm.models.diffusion.ddpm.LatentDiffusion
params:
linear_start: 0.00085
linear_end: 0.0120
num_timesteps_cond: 1
log_every_t: 200
timesteps: 1000
first_stage_key: "image"
cond_stage_key: "txt"
image_size: 64
channels: 4
cond_stage_trainable: false # Note: different from the one we trained before
conditioning_key: crossattn
scale_factor: 0.18215

scheduler_config: # 10000 warmup steps
target: ldm.lr_scheduler.LambdaLinearScheduler
params:
warm_up_steps: [ 1 ] # NOTE for resuming. use 10000 if starting from scratch
cycle_lengths: [ 10000000000000 ] # incredibly large number to prevent corner cases
f_start: [ 1.e-6 ]
f_max: [ 1. ]
f_min: [ 1. ]

unet_config:
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
params:
image_size: 32 # unused
in_channels: 4
out_channels: 4
model_channels: 320
attention_resolutions: [ 4, 2, 1 ]
num_res_blocks: 2
channel_mult: [ 1, 2, 4, 4 ]
num_heads: 8
use_spatial_transformer: True
transformer_depth: 1
context_dim: 768
use_checkpoint: True
legacy: False

first_stage_config:
target: ldm.models.autoencoder.AutoencoderKL
ckpt_path: "models/first_stage_models/kl-f8/model.ckpt"
params:
embed_dim: 4
monitor: val/rec_loss
ddconfig:
double_z: true
z_channels: 4
resolution: 256
in_channels: 3
out_ch: 3
ch: 128
ch_mult:
- 1
- 2
- 4
- 4
num_res_blocks: 2
attn_resolutions: []
dropout: 0.0
lossconfig:
target: torch.nn.Identity

cond_stage_config:
target: ldm.modules.encoders.modules.FrozenCLIPEmbedder


data:
target: main.DataModuleFromConfig
params:
batch_size: 4
num_workers: 4
num_val_workers: 0 # Avoid a weird val dataloader issue
train:
# target: ldm.data.simple.hf_dataset
# params:
# name: lambdalabs/pokemon-blip-captions
train:
target: ldm.data.simple.FolderData
params:
root_dir: /home/jovyan/stable-diffusion/data/images/
caption_file: "/home/jovyan/stable-diffusion/data/captions.json"
image_transforms:
- target: torchvision.transforms.Resize
params:
size: 512
interpolation: 3
- target: torchvision.transforms.RandomCrop
params:
size: 512
- target: torchvision.transforms.RandomHorizontalFlip
validation:
target: ldm.data.simple.TextOnly
params:
captions:
- "the photo of choley bhature with a glass of lassi"
- "the photo of dal makhani in a lunch box"
- "the photo of corn kurkure"
output_size: 512
n_gpus: 2 # small hack to sure we see all our samples


lightning:
find_unused_parameters: False

modelcheckpoint:
params:
every_n_train_steps: 2000
save_top_k: -1
monitor: null

callbacks:
image_logger:
target: main.ImageLogger
params:
batch_frequency: 2000
max_images: 4
increase_log_steps: False
log_first_step: True
log_all_val: True
log_images_kwargs:
use_ema_scope: True
inpaint: False
plot_progressive_rows: False
plot_diffusion_rows: False
N: 4
unconditional_guidance_scale: 3.0
unconditional_guidance_label: [""]

trainer:
benchmark: True
num_sanity_val_steps: 0
accumulate_grad_batches: 1
1 change: 1 addition & 0 deletions data/captions.json

Large diffs are not rendered by default.

Binary file added data/images/0.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/10.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/100.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/1000.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/1001.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/1002.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/1003.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/1004.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/1005.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/1006.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/1007.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/1008.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/1009.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/101.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/1010.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/1011.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/1012.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/1013.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/1014.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/1015.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/1016.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/1017.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/1018.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/1019.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/102.jpg
Binary file added data/images/1020.jpg
Binary file added data/images/1021.jpg
Binary file added data/images/1022.jpg
Binary file added data/images/1023.jpg
Binary file added data/images/1024.jpg
Binary file added data/images/1025.jpg
Binary file added data/images/1026.jpg
Binary file added data/images/1027.jpg
Binary file added data/images/1028.jpg
Binary file added data/images/1029.jpg
Binary file added data/images/103.jpg
Binary file added data/images/1030.jpg
Binary file added data/images/1031.jpg
Binary file added data/images/1032.jpg
Binary file added data/images/1033.jpg
Binary file added data/images/1034.jpg
Binary file added data/images/1035.jpg
Binary file added data/images/1036.jpg
Binary file added data/images/1037.jpg
Binary file added data/images/1038.jpg
Binary file added data/images/1039.jpg
Binary file added data/images/104.jpg
Binary file added data/images/1040.jpg
Binary file added data/images/1041.jpg
Binary file added data/images/1042.jpg
Binary file added data/images/1043.jpg
Binary file added data/images/1044.jpg
Binary file added data/images/1045.jpg
Binary file added data/images/1046.jpg
Binary file added data/images/1047.jpg
Binary file added data/images/1048.jpg
Binary file added data/images/1049.jpg
Binary file added data/images/105.jpg
Binary file added data/images/1050.jpg
Binary file added data/images/1051.jpg
Binary file added data/images/1052.jpg
Binary file added data/images/1053.jpg
Binary file added data/images/1054.jpg
Binary file added data/images/1055.jpg
Binary file added data/images/1056.jpg
Binary file added data/images/1057.jpg
Binary file added data/images/1058.jpg
Binary file added data/images/1059.jpg
Binary file added data/images/106.jpg
Binary file added data/images/1060.jpg
Binary file added data/images/1061.jpg
Binary file added data/images/1062.jpg
Binary file added data/images/1063.jpg
Binary file added data/images/1064.jpg
Binary file added data/images/1065.jpg
Binary file added data/images/1066.jpg
Binary file added data/images/1067.jpg
Binary file added data/images/1068.jpg
Binary file added data/images/1069.jpg
Binary file added data/images/107.jpg
Binary file added data/images/1070.jpg
Binary file added data/images/1071.jpg
Binary file added data/images/1072.jpg
Binary file added data/images/1073.jpg
Binary file added data/images/1074.jpg
Binary file added data/images/1075.jpg
Binary file added data/images/1076.jpg
Binary file added data/images/1077.jpg
Binary file added data/images/1078.jpg
Binary file added data/images/1079.jpg
Binary file added data/images/108.jpg
Binary file added data/images/1080.jpg
Binary file added data/images/1081.jpg
Binary file added data/images/1082.jpg
Binary file added data/images/1083.jpg
Binary file added data/images/1084.jpg
Binary file added data/images/1085.jpg
Binary file added data/images/1086.jpg
Binary file added data/images/1087.jpg
Binary file added data/images/1088.jpg
Binary file added data/images/1089.jpg
Binary file added data/images/109.jpg
Binary file added data/images/1090.jpg
Binary file added data/images/1091.jpg
Binary file added data/images/1092.jpg
Binary file added data/images/1093.jpg
Binary file added data/images/1094.jpg
Binary file added data/images/1095.jpg
Binary file added data/images/1096.jpg
Binary file added data/images/1097.jpg
Binary file added data/images/1098.jpg
Binary file added data/images/1099.jpg
Binary file added data/images/11.jpg
Binary file added data/images/110.jpg
Binary file added data/images/1100.jpg
Binary file added data/images/1101.jpg
Binary file added data/images/1102.jpg
Binary file added data/images/1103.jpg
Binary file added data/images/1104.jpg
Binary file added data/images/1105.jpg
Binary file added data/images/1106.jpg
Binary file added data/images/1107.jpg
Binary file added data/images/1108.jpg
Binary file added data/images/1109.jpg
Binary file added data/images/111.jpg
Binary file added data/images/1110.jpg
Binary file added data/images/1111.jpg
Binary file added data/images/1112.jpg
Binary file added data/images/1113.jpg
Binary file added data/images/1114.jpg
Binary file added data/images/1115.jpg
Binary file added data/images/1116.jpg
Binary file added data/images/1117.jpg
Binary file added data/images/1118.jpg
Binary file added data/images/1119.jpg
Binary file added data/images/112.jpg
Binary file added data/images/1120.jpg
Binary file added data/images/1121.jpg
Binary file added data/images/1122.jpg
Binary file added data/images/1123.jpg
Binary file added data/images/1124.jpg
Binary file added data/images/1125.jpg
Binary file added data/images/1126.jpg
Binary file added data/images/1127.jpg
Binary file added data/images/1128.jpg
Binary file added data/images/1129.jpg
Binary file added data/images/113.jpg
Binary file added data/images/1130.jpg
Binary file added data/images/1131.jpg
Binary file added data/images/1132.jpg
Binary file added data/images/1133.jpg
Binary file added data/images/1134.jpg
Binary file added data/images/1135.jpg
Binary file added data/images/1136.jpg
Binary file added data/images/1137.jpg
Binary file added data/images/1138.jpg
Binary file added data/images/1139.jpg
Binary file added data/images/114.jpg
Binary file added data/images/1140.jpg
Binary file added data/images/1141.jpg
Binary file added data/images/1142.jpg
Binary file added data/images/1143.jpg
Binary file added data/images/1144.jpg
Binary file added data/images/1145.jpg
Binary file added data/images/1146.jpg
Binary file added data/images/1147.jpg
Binary file added data/images/1148.jpg
Binary file added data/images/1149.jpg
Binary file added data/images/115.jpg
Binary file added data/images/1150.jpg
Binary file added data/images/1151.jpg
Binary file added data/images/1152.jpg
Binary file added data/images/1153.jpg
Binary file added data/images/1154.jpg
Binary file added data/images/1155.jpg
Binary file added data/images/1156.jpg
Binary file added data/images/1157.jpg
Binary file added data/images/1158.jpg
Binary file added data/images/1159.jpg
Binary file added data/images/116.jpg
Binary file added data/images/1160.jpg
Binary file added data/images/1161.jpg
Binary file added data/images/1162.jpg
Binary file added data/images/1163.jpg
Binary file added data/images/1164.jpg
Binary file added data/images/1165.jpg
Binary file added data/images/1166.jpg
Binary file added data/images/1167.jpg
Binary file added data/images/1168.jpg
Binary file added data/images/1169.jpg
Binary file added data/images/117.jpg
Binary file added data/images/1170.jpg
Binary file added data/images/1171.jpg
Binary file added data/images/1172.jpg
Binary file added data/images/1173.jpg
Binary file added data/images/1174.jpg
Binary file added data/images/1175.jpg
Binary file added data/images/1176.jpg
Binary file added data/images/1177.jpg
Binary file added data/images/1178.jpg
Binary file added data/images/1179.jpg
Binary file added data/images/118.jpg
Binary file added data/images/1180.jpg
Binary file added data/images/1181.jpg
Binary file added data/images/1182.jpg
Binary file added data/images/1183.jpg
Binary file added data/images/1184.jpg
Binary file added data/images/1185.jpg
Binary file added data/images/1186.jpg
Binary file added data/images/1187.jpg
Binary file added data/images/1188.jpg
Binary file added data/images/1189.jpg
Binary file added data/images/119.jpg
Binary file added data/images/1190.jpg
Binary file added data/images/1191.jpg
Binary file added data/images/1192.jpg
Binary file added data/images/1193.jpg
Binary file added data/images/1194.jpg
Binary file added data/images/1195.jpg
Binary file added data/images/1196.jpg
Binary file added data/images/1197.jpg
Binary file added data/images/1198.jpg
Binary file added data/images/1199.jpg
Binary file added data/images/12.jpg
Binary file added data/images/120.jpg
Binary file added data/images/1200.jpg
Binary file added data/images/1201.jpg
Binary file added data/images/1202.jpg
Binary file added data/images/1203.jpg
Binary file added data/images/1204.jpg
Binary file added data/images/1205.jpg
Binary file added data/images/1206.jpg
Binary file added data/images/1207.jpg
Binary file added data/images/1208.jpg
Binary file added data/images/1209.jpg
Binary file added data/images/121.jpg
Binary file added data/images/1210.jpg
Binary file added data/images/1211.jpg
Binary file added data/images/1212.jpg
Binary file added data/images/1213.jpg
Binary file added data/images/1214.jpg
Binary file added data/images/1215.jpg
Binary file added data/images/1216.jpg
Binary file added data/images/1217.jpg
Binary file added data/images/1218.jpg
Binary file added data/images/1219.jpg
Binary file added data/images/122.jpg
Binary file added data/images/1220.jpg
Binary file added data/images/1221.jpg
Binary file added data/images/1222.jpg
Binary file added data/images/1223.jpg
Binary file added data/images/1224.jpg
Binary file added data/images/1225.jpg
Binary file added data/images/1226.jpg
Binary file added data/images/1227.jpg
Binary file added data/images/1228.jpg
Binary file added data/images/1229.jpg
Binary file added data/images/123.jpg
Binary file added data/images/1230.jpg
Binary file added data/images/1231.jpg
Binary file added data/images/1232.jpg
Binary file added data/images/1233.jpg
Binary file added data/images/1234.jpg
Binary file added data/images/1235.jpg
Binary file added data/images/1236.jpg
Binary file added data/images/1237.jpg
Binary file added data/images/1238.jpg
Binary file added data/images/1239.jpg
Binary file added data/images/124.jpg
Binary file added data/images/1240.jpg
Binary file added data/images/1241.jpg
Binary file added data/images/1242.jpg
Binary file added data/images/1243.jpg
Binary file added data/images/1244.jpg
Binary file added data/images/1245.jpg
Binary file added data/images/1246.jpg
Binary file added data/images/1247.jpg
Binary file added data/images/1248.jpg
Binary file added data/images/1249.jpg
Binary file added data/images/125.jpg
Binary file added data/images/1250.jpg
Binary file added data/images/1251.jpg
Binary file added data/images/1252.jpg
Binary file added data/images/1253.jpg
Binary file added data/images/1254.jpg
Binary file added data/images/1255.jpg
Binary file added data/images/1256.jpg
Binary file added data/images/1257.jpg
Binary file added data/images/1258.jpg
Binary file added data/images/1259.jpg
Binary file added data/images/126.jpg
Binary file added data/images/1260.jpg
Binary file added data/images/1261.jpg
Binary file added data/images/1262.jpg
Binary file added data/images/1263.jpg
Binary file added data/images/1264.jpg
Binary file added data/images/1265.jpg
Loading

0 comments on commit 768d170

Please sign in to comment.