Instructions to use heboya8/controlnet-sd-2.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use heboya8/controlnet-sd-2.1 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("heboya8/controlnet-sd-2.1", 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 files using upload-large-folder tool
Browse files- checkpoint-10500/controlnet/config.json +57 -0
- checkpoint-10500/controlnet/diffusion_pytorch_model.safetensors +3 -0
- checkpoint-10500/optimizer.bin +3 -0
- checkpoint-10500/random_states_0.pkl +3 -0
- checkpoint-10500/scaler.pt +3 -0
- checkpoint-10500/scheduler.bin +3 -0
- checkpoint-11000/controlnet/config.json +57 -0
- checkpoint-11000/controlnet/diffusion_pytorch_model.safetensors +3 -0
- checkpoint-11000/optimizer.bin +3 -0
- checkpoint-11000/random_states_0.pkl +3 -0
- checkpoint-11000/scaler.pt +3 -0
- checkpoint-11000/scheduler.bin +3 -0
- config.json +1 -1
- diffusion_pytorch_model.safetensors +1 -1
- logs/train_controlnet/1751870067.543005/events.out.tfevents.1751870067.5f1be4f2c97f.132.1 +3 -0
- logs/train_controlnet/1751870067.5449488/hparams.yml +50 -0
- logs/train_controlnet/events.out.tfevents.1751870067.5f1be4f2c97f.132.0 +3 -0
checkpoint-10500/controlnet/config.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "ControlNetModel",
|
| 3 |
+
"_diffusers_version": "0.35.0.dev0",
|
| 4 |
+
"_name_or_path": "./output_model/checkpoint-9000",
|
| 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": 3,
|
| 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 |
+
}
|
checkpoint-10500/controlnet/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2ede4af3744380eee512f570c3251022368dd87bc63c40f837b739fabbdd2503
|
| 3 |
+
size 1456953560
|
checkpoint-10500/optimizer.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:003539441a79017b5e5745d01147c1c4863116a427833f8fbac745582a1e7986
|
| 3 |
+
size 741499074
|
checkpoint-10500/random_states_0.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7f06328171d41d751645de7cb9d578ecbd44d886694813162bbefbf5a1da546a
|
| 3 |
+
size 14408
|
checkpoint-10500/scaler.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c7cb1e8948358e788e0bec02ec26e9e69a4742c6828b07888894f602a3fe8e2e
|
| 3 |
+
size 988
|
checkpoint-10500/scheduler.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9573ac3badc7f7866bf33950bbeeabe32d935ddec85948b9474440e6e9cf63d3
|
| 3 |
+
size 1000
|
checkpoint-11000/controlnet/config.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "ControlNetModel",
|
| 3 |
+
"_diffusers_version": "0.35.0.dev0",
|
| 4 |
+
"_name_or_path": "./output_model/checkpoint-9000",
|
| 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": 3,
|
| 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 |
+
}
|
checkpoint-11000/controlnet/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:62037648c697307ef7f7b378bb423c7dbc6ee72d2c3a5ca0c263875959aa05bc
|
| 3 |
+
size 1456953560
|
checkpoint-11000/optimizer.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:70ae4148d676b72b931f1bd832e1442989f379e41df5ede9ad773bb781708fdd
|
| 3 |
+
size 741499074
|
checkpoint-11000/random_states_0.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ca1711dd4b9e36e98e4513495733c36691b8e7893c9220b31c3f7f9682c4efed
|
| 3 |
+
size 14344
|
checkpoint-11000/scaler.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6a5b5b3831d6821064fcfeb321dddbb162e04b47097549a6ed90b51bed74f904
|
| 3 |
+
size 988
|
checkpoint-11000/scheduler.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f85d393038e1af38b1a1508644490a359365ab41faeb6b31c9e2e51b9af513c5
|
| 3 |
+
size 1000
|
config.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"_class_name": "ControlNetModel",
|
| 3 |
"_diffusers_version": "0.35.0.dev0",
|
| 4 |
-
"_name_or_path": "./output_model/checkpoint-
|
| 5 |
"act_fn": "silu",
|
| 6 |
"addition_embed_type": null,
|
| 7 |
"addition_embed_type_num_heads": 64,
|
|
|
|
| 1 |
{
|
| 2 |
"_class_name": "ControlNetModel",
|
| 3 |
"_diffusers_version": "0.35.0.dev0",
|
| 4 |
+
"_name_or_path": "./output_model/checkpoint-9000",
|
| 5 |
"act_fn": "silu",
|
| 6 |
"addition_embed_type": null,
|
| 7 |
"addition_embed_type_num_heads": 64,
|
diffusion_pytorch_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1456953560
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:916fb6e184021e3ef756265e6e05732d9ca392d4114d62dd07e5cc31f2c0ea66
|
| 3 |
size 1456953560
|
logs/train_controlnet/1751870067.543005/events.out.tfevents.1751870067.5f1be4f2c97f.132.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:609abbd8b2451584fec78c85f1a79b14472f3d89d6667ececad5dc46977f3ac5
|
| 3 |
+
size 2504
|
logs/train_controlnet/1751870067.5449488/hparams.yml
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
adam_beta1: 0.9
|
| 2 |
+
adam_beta2: 0.999
|
| 3 |
+
adam_epsilon: 1.0e-08
|
| 4 |
+
adam_weight_decay: 0.01
|
| 5 |
+
allow_tf32: false
|
| 6 |
+
cache_dir: null
|
| 7 |
+
caption_column: text
|
| 8 |
+
checkpointing_steps: 500
|
| 9 |
+
checkpoints_total_limit: 2
|
| 10 |
+
conditioning_image_column: conditioning_image
|
| 11 |
+
controlnet_model_name_or_path: null
|
| 12 |
+
dataloader_num_workers: 0
|
| 13 |
+
dataset_config_name: null
|
| 14 |
+
dataset_name: HighCWu/open_pose_controlnet_subset
|
| 15 |
+
enable_xformers_memory_efficient_attention: false
|
| 16 |
+
gradient_accumulation_steps: 2
|
| 17 |
+
gradient_checkpointing: true
|
| 18 |
+
hub_model_id: null
|
| 19 |
+
hub_token: null
|
| 20 |
+
image_column: image
|
| 21 |
+
learning_rate: 0.0002
|
| 22 |
+
logging_dir: logs
|
| 23 |
+
lr_num_cycles: 1
|
| 24 |
+
lr_power: 1.0
|
| 25 |
+
lr_scheduler: constant
|
| 26 |
+
lr_warmup_steps: 500
|
| 27 |
+
max_grad_norm: 1.0
|
| 28 |
+
max_train_samples: null
|
| 29 |
+
max_train_steps: 11250
|
| 30 |
+
mixed_precision: fp16
|
| 31 |
+
num_train_epochs: 30
|
| 32 |
+
num_validation_images: 4
|
| 33 |
+
output_dir: ./output_model
|
| 34 |
+
pretrained_model_name_or_path: stabilityai/stable-diffusion-2-1
|
| 35 |
+
proportion_empty_prompts: 0
|
| 36 |
+
push_to_hub: false
|
| 37 |
+
report_to: tensorboard
|
| 38 |
+
resolution: 512
|
| 39 |
+
resume_from_checkpoint: ./output_model/checkpoint-9000
|
| 40 |
+
revision: null
|
| 41 |
+
scale_lr: false
|
| 42 |
+
seed: null
|
| 43 |
+
set_grads_to_none: false
|
| 44 |
+
tokenizer_name: null
|
| 45 |
+
tracker_project_name: train_controlnet
|
| 46 |
+
train_batch_size: 4
|
| 47 |
+
train_data_dir: null
|
| 48 |
+
use_8bit_adam: true
|
| 49 |
+
validation_steps: 100
|
| 50 |
+
variant: null
|
logs/train_controlnet/events.out.tfevents.1751870067.5f1be4f2c97f.132.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a50cb20e9623e4e17fc22cbb0f1fe990f315d0baf08774a5a1906be1cc5e8d8f
|
| 3 |
+
size 378088
|