Instructions to use Miayan/project with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Miayan/project with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Miayan/project", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Add checkpoint for train_ex6_11
Browse files- train_ex6_11/checkpoint-350000/controlnet/config.json +57 -0
- train_ex6_11/checkpoint-350000/controlnet/diffusion_pytorch_model.safetensors +3 -0
- train_ex6_11/checkpoint-350000/custom_encoder/config.json +9 -0
- train_ex6_11/checkpoint-350000/custom_encoder/diffusion_pytorch_model.safetensors +3 -0
- train_ex6_11/checkpoint-350000/custom_unet.pth +3 -0
- train_ex6_11/checkpoint-350000/optimizer.bin +3 -0
- train_ex6_11/checkpoint-350000/random_states_0.pkl +3 -0
- train_ex6_11/checkpoint-350000/scheduler.bin +3 -0
- train_ex6_11/config.json +57 -0
- train_ex6_11/config.yaml +105 -0
- train_ex6_11/diffusion_pytorch_model.safetensors +3 -0
train_ex6_11/checkpoint-350000/controlnet/config.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "ControlNetModel",
|
| 3 |
+
"_diffusers_version": "0.33.1",
|
| 4 |
+
"_name_or_path": "train_ex6_11/checkpoint-235000",
|
| 5 |
+
"act_fn": "silu",
|
| 6 |
+
"addition_embed_type": null,
|
| 7 |
+
"addition_embed_type_num_heads": 64,
|
| 8 |
+
"addition_time_embed_dim": null,
|
| 9 |
+
"attention_head_dim": [
|
| 10 |
+
5,
|
| 11 |
+
10,
|
| 12 |
+
20,
|
| 13 |
+
20
|
| 14 |
+
],
|
| 15 |
+
"block_out_channels": [
|
| 16 |
+
320,
|
| 17 |
+
640,
|
| 18 |
+
1280,
|
| 19 |
+
1280
|
| 20 |
+
],
|
| 21 |
+
"class_embed_type": null,
|
| 22 |
+
"conditioning_channels": 6,
|
| 23 |
+
"conditioning_embedding_out_channels": [
|
| 24 |
+
16,
|
| 25 |
+
32,
|
| 26 |
+
96,
|
| 27 |
+
256
|
| 28 |
+
],
|
| 29 |
+
"controlnet_conditioning_channel_order": "rgb",
|
| 30 |
+
"cross_attention_dim": 1024,
|
| 31 |
+
"down_block_types": [
|
| 32 |
+
"CrossAttnDownBlock2D",
|
| 33 |
+
"CrossAttnDownBlock2D",
|
| 34 |
+
"CrossAttnDownBlock2D",
|
| 35 |
+
"DownBlock2D"
|
| 36 |
+
],
|
| 37 |
+
"downsample_padding": 1,
|
| 38 |
+
"encoder_hid_dim": null,
|
| 39 |
+
"encoder_hid_dim_type": null,
|
| 40 |
+
"flip_sin_to_cos": true,
|
| 41 |
+
"freq_shift": 0,
|
| 42 |
+
"global_pool_conditions": false,
|
| 43 |
+
"in_channels": 4,
|
| 44 |
+
"layers_per_block": 2,
|
| 45 |
+
"mid_block_scale_factor": 1,
|
| 46 |
+
"mid_block_type": "UNetMidBlock2DCrossAttn",
|
| 47 |
+
"norm_eps": 1e-05,
|
| 48 |
+
"norm_num_groups": 32,
|
| 49 |
+
"num_attention_heads": null,
|
| 50 |
+
"num_class_embeds": null,
|
| 51 |
+
"only_cross_attention": false,
|
| 52 |
+
"projection_class_embeddings_input_dim": null,
|
| 53 |
+
"resnet_time_scale_shift": "default",
|
| 54 |
+
"transformer_layers_per_block": 1,
|
| 55 |
+
"upcast_attention": true,
|
| 56 |
+
"use_linear_projection": true
|
| 57 |
+
}
|
train_ex6_11/checkpoint-350000/controlnet/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a33f0dfe1b3ee8958cb4b0909fb1dc09b4c9dda1c3e4d1dede12fcefa03d53c6
|
| 3 |
+
size 1461729992
|
train_ex6_11/checkpoint-350000/custom_encoder/config.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"Bc": 4,
|
| 3 |
+
"Bi": 4,
|
| 4 |
+
"K": 4,
|
| 5 |
+
"_class_name": "CustomEncoder",
|
| 6 |
+
"_diffusers_version": "0.33.1",
|
| 7 |
+
"_name_or_path": "train_ex6_11/checkpoint-235000",
|
| 8 |
+
"cross_dim": 1024
|
| 9 |
+
}
|
train_ex6_11/checkpoint-350000/custom_encoder/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:29d9d658fc03a2c9c1c6023674b0f06bb22212d44a1de1a9e53f0b80078f0d4c
|
| 3 |
+
size 4531800
|
train_ex6_11/checkpoint-350000/custom_unet.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4362c14eda6e213e9fc51d69f0f1934d38530abfd1ae07d847f1b734dba8c175
|
| 3 |
+
size 3463973299
|
train_ex6_11/checkpoint-350000/optimizer.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ccf12ef958bee5dc79f584e0be227e7c467bf844ec2ab2a369404e3bb25dfee2
|
| 3 |
+
size 5573559453
|
train_ex6_11/checkpoint-350000/random_states_0.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:11f262de1378ee212e6ceab354d02ffcbdbb4de00e70a2d1a24c921431f43d8a
|
| 3 |
+
size 14821
|
train_ex6_11/checkpoint-350000/scheduler.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0510b89d5eee5b4514b4a4ee20a233c8fe4fdb28882670551170b9d38712c5ad
|
| 3 |
+
size 1401
|
train_ex6_11/config.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "ControlNetModel",
|
| 3 |
+
"_diffusers_version": "0.33.1",
|
| 4 |
+
"_name_or_path": "train_ex6_11/checkpoint-190000",
|
| 5 |
+
"act_fn": "silu",
|
| 6 |
+
"addition_embed_type": null,
|
| 7 |
+
"addition_embed_type_num_heads": 64,
|
| 8 |
+
"addition_time_embed_dim": null,
|
| 9 |
+
"attention_head_dim": [
|
| 10 |
+
5,
|
| 11 |
+
10,
|
| 12 |
+
20,
|
| 13 |
+
20
|
| 14 |
+
],
|
| 15 |
+
"block_out_channels": [
|
| 16 |
+
320,
|
| 17 |
+
640,
|
| 18 |
+
1280,
|
| 19 |
+
1280
|
| 20 |
+
],
|
| 21 |
+
"class_embed_type": null,
|
| 22 |
+
"conditioning_channels": 6,
|
| 23 |
+
"conditioning_embedding_out_channels": [
|
| 24 |
+
16,
|
| 25 |
+
32,
|
| 26 |
+
96,
|
| 27 |
+
256
|
| 28 |
+
],
|
| 29 |
+
"controlnet_conditioning_channel_order": "rgb",
|
| 30 |
+
"cross_attention_dim": 1024,
|
| 31 |
+
"down_block_types": [
|
| 32 |
+
"CrossAttnDownBlock2D",
|
| 33 |
+
"CrossAttnDownBlock2D",
|
| 34 |
+
"CrossAttnDownBlock2D",
|
| 35 |
+
"DownBlock2D"
|
| 36 |
+
],
|
| 37 |
+
"downsample_padding": 1,
|
| 38 |
+
"encoder_hid_dim": null,
|
| 39 |
+
"encoder_hid_dim_type": null,
|
| 40 |
+
"flip_sin_to_cos": true,
|
| 41 |
+
"freq_shift": 0,
|
| 42 |
+
"global_pool_conditions": false,
|
| 43 |
+
"in_channels": 4,
|
| 44 |
+
"layers_per_block": 2,
|
| 45 |
+
"mid_block_scale_factor": 1,
|
| 46 |
+
"mid_block_type": "UNetMidBlock2DCrossAttn",
|
| 47 |
+
"norm_eps": 1e-05,
|
| 48 |
+
"norm_num_groups": 32,
|
| 49 |
+
"num_attention_heads": null,
|
| 50 |
+
"num_class_embeds": null,
|
| 51 |
+
"only_cross_attention": false,
|
| 52 |
+
"projection_class_embeddings_input_dim": null,
|
| 53 |
+
"resnet_time_scale_shift": "default",
|
| 54 |
+
"transformer_layers_per_block": 1,
|
| 55 |
+
"upcast_attention": true,
|
| 56 |
+
"use_linear_projection": true
|
| 57 |
+
}
|
train_ex6_11/config.yaml
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
experiment:
|
| 2 |
+
project_name: relighting_indoors
|
| 3 |
+
output_dir: train_ex6_11
|
| 4 |
+
logging_dir: logs
|
| 5 |
+
report_to: tensorboard
|
| 6 |
+
model:
|
| 7 |
+
pretrained_model_name_or_path: /mnt/HDD3/miayan/paper/envs/huggingface_cache/models--stabilityai--stable-diffusion-2-1/snapshots/5cae40e6a2745ae2b01ad92ae5043f95f23644d6
|
| 8 |
+
revision: null
|
| 9 |
+
variant: null
|
| 10 |
+
tokenizer_name: null
|
| 11 |
+
hf_repo_id: Miayan/project
|
| 12 |
+
hf_version: null
|
| 13 |
+
pretrain_unet_path: scribblelight_controlnet/checkpoint-10000
|
| 14 |
+
resume_from_checkpoint: latest
|
| 15 |
+
light_encoder:
|
| 16 |
+
cross_dim: 768
|
| 17 |
+
K: 4
|
| 18 |
+
Bi: 4
|
| 19 |
+
Bc: 4
|
| 20 |
+
data:
|
| 21 |
+
dataset_cache_dir: /mnt/HDD3/miayan/paper/relighting_datasets/
|
| 22 |
+
data_hf_repo_id: Miayan/physical-relighting-dataset
|
| 23 |
+
data_split: test
|
| 24 |
+
resolution: 256
|
| 25 |
+
dataloader_num_workers: 0
|
| 26 |
+
condition_mode: lightmap_normal
|
| 27 |
+
colors:
|
| 28 |
+
- - 255
|
| 29 |
+
- 255
|
| 30 |
+
- 255
|
| 31 |
+
- - 255
|
| 32 |
+
- 0
|
| 33 |
+
- 0
|
| 34 |
+
- - 0
|
| 35 |
+
- 255
|
| 36 |
+
- 0
|
| 37 |
+
- - 0
|
| 38 |
+
- 0
|
| 39 |
+
- 255
|
| 40 |
+
- - 255
|
| 41 |
+
- 255
|
| 42 |
+
- 0
|
| 43 |
+
- - 255
|
| 44 |
+
- 165
|
| 45 |
+
- 0
|
| 46 |
+
- - 128
|
| 47 |
+
- 0
|
| 48 |
+
- 128
|
| 49 |
+
- - 255
|
| 50 |
+
- 192
|
| 51 |
+
- 203
|
| 52 |
+
- - 0
|
| 53 |
+
- 255
|
| 54 |
+
- 255
|
| 55 |
+
- - 255
|
| 56 |
+
- 0
|
| 57 |
+
- 255
|
| 58 |
+
intensities:
|
| 59 |
+
- 0.0
|
| 60 |
+
- 0.1
|
| 61 |
+
- 0.2
|
| 62 |
+
- 0.4
|
| 63 |
+
- 0.7
|
| 64 |
+
- 1.0
|
| 65 |
+
training:
|
| 66 |
+
batch_size: 1
|
| 67 |
+
num_epochs: 40
|
| 68 |
+
max_train_steps: null
|
| 69 |
+
max_train_samples: null
|
| 70 |
+
seed: 42
|
| 71 |
+
mixed_precision: 'no'
|
| 72 |
+
allow_tf32: true
|
| 73 |
+
gradient_accumulation_steps: 1
|
| 74 |
+
checkpointing_steps: 5000
|
| 75 |
+
checkpoints_total_limit: 5
|
| 76 |
+
learning_rate: 5.0e-06
|
| 77 |
+
scale_lr: false
|
| 78 |
+
lr_scheduler: constant
|
| 79 |
+
lr_warmup_steps: 500
|
| 80 |
+
adam_beta1: 0.9
|
| 81 |
+
adam_beta2: 0.999
|
| 82 |
+
adam_weight_decay: 0.01
|
| 83 |
+
adam_epsilon: 1.0e-08
|
| 84 |
+
max_grad_norm: 1.0
|
| 85 |
+
use_8bit_adam: false
|
| 86 |
+
set_grads_to_none: false
|
| 87 |
+
losses:
|
| 88 |
+
phys_loss:
|
| 89 |
+
enabled: true
|
| 90 |
+
weight: 1.0
|
| 91 |
+
latent_loss:
|
| 92 |
+
enabled: true
|
| 93 |
+
weight: 1.0
|
| 94 |
+
image_loss:
|
| 95 |
+
enabled: true
|
| 96 |
+
weight: 1.0
|
| 97 |
+
area_loss:
|
| 98 |
+
enabled: false
|
| 99 |
+
weight: 10.0
|
| 100 |
+
intensity_loss:
|
| 101 |
+
enabled: false
|
| 102 |
+
weight: 1.0
|
| 103 |
+
recon_loss:
|
| 104 |
+
enabled: false
|
| 105 |
+
weight: 1.0
|
train_ex6_11/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ca032feb637f99c4c5601ac3e6c77672cfebe4627365b43a92c6faea8107414e
|
| 3 |
+
size 1461729992
|