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-3000/controlnet/config.json +56 -0
- checkpoint-3000/controlnet/diffusion_pytorch_model.safetensors +3 -0
- checkpoint-3000/optimizer.bin +3 -0
- checkpoint-3000/random_states_0.pkl +3 -0
- checkpoint-3000/scaler.pt +3 -0
- checkpoint-3000/scheduler.bin +3 -0
- checkpoint-3500/controlnet/config.json +56 -0
- checkpoint-3500/controlnet/diffusion_pytorch_model.safetensors +3 -0
- checkpoint-3500/optimizer.bin +3 -0
- checkpoint-3500/random_states_0.pkl +3 -0
- checkpoint-3500/scaler.pt +3 -0
- checkpoint-3500/scheduler.bin +3 -0
- config.json +56 -0
- diffusion_pytorch_model.safetensors +3 -0
- logs/train_controlnet/1751709967.0118759/events.out.tfevents.1751709967.baa2ca0a8200.123.1 +3 -0
- logs/train_controlnet/1751709967.0134513/hparams.yml +50 -0
- logs/train_controlnet/events.out.tfevents.1751709966.baa2ca0a8200.123.0 +3 -0
checkpoint-3000/controlnet/config.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "ControlNetModel",
|
| 3 |
+
"_diffusers_version": "0.35.0.dev0",
|
| 4 |
+
"act_fn": "silu",
|
| 5 |
+
"addition_embed_type": null,
|
| 6 |
+
"addition_embed_type_num_heads": 64,
|
| 7 |
+
"addition_time_embed_dim": null,
|
| 8 |
+
"attention_head_dim": [
|
| 9 |
+
5,
|
| 10 |
+
10,
|
| 11 |
+
20,
|
| 12 |
+
20
|
| 13 |
+
],
|
| 14 |
+
"block_out_channels": [
|
| 15 |
+
320,
|
| 16 |
+
640,
|
| 17 |
+
1280,
|
| 18 |
+
1280
|
| 19 |
+
],
|
| 20 |
+
"class_embed_type": null,
|
| 21 |
+
"conditioning_channels": 3,
|
| 22 |
+
"conditioning_embedding_out_channels": [
|
| 23 |
+
16,
|
| 24 |
+
32,
|
| 25 |
+
96,
|
| 26 |
+
256
|
| 27 |
+
],
|
| 28 |
+
"controlnet_conditioning_channel_order": "rgb",
|
| 29 |
+
"cross_attention_dim": 1024,
|
| 30 |
+
"down_block_types": [
|
| 31 |
+
"CrossAttnDownBlock2D",
|
| 32 |
+
"CrossAttnDownBlock2D",
|
| 33 |
+
"CrossAttnDownBlock2D",
|
| 34 |
+
"DownBlock2D"
|
| 35 |
+
],
|
| 36 |
+
"downsample_padding": 1,
|
| 37 |
+
"encoder_hid_dim": null,
|
| 38 |
+
"encoder_hid_dim_type": null,
|
| 39 |
+
"flip_sin_to_cos": true,
|
| 40 |
+
"freq_shift": 0,
|
| 41 |
+
"global_pool_conditions": false,
|
| 42 |
+
"in_channels": 4,
|
| 43 |
+
"layers_per_block": 2,
|
| 44 |
+
"mid_block_scale_factor": 1,
|
| 45 |
+
"mid_block_type": "UNetMidBlock2DCrossAttn",
|
| 46 |
+
"norm_eps": 1e-05,
|
| 47 |
+
"norm_num_groups": 32,
|
| 48 |
+
"num_attention_heads": null,
|
| 49 |
+
"num_class_embeds": null,
|
| 50 |
+
"only_cross_attention": false,
|
| 51 |
+
"projection_class_embeddings_input_dim": null,
|
| 52 |
+
"resnet_time_scale_shift": "default",
|
| 53 |
+
"transformer_layers_per_block": 1,
|
| 54 |
+
"upcast_attention": true,
|
| 55 |
+
"use_linear_projection": true
|
| 56 |
+
}
|
checkpoint-3000/controlnet/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c0ae99b42bd93116a7900fd709431edb3b563e651e0da4db0e3805dbe377d786
|
| 3 |
+
size 1456953560
|
checkpoint-3000/optimizer.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7ee1aa03e9c542e49cf6e6ef5c4bab94a72a0855633a6e6189bed306f5166c73
|
| 3 |
+
size 741120954
|
checkpoint-3000/random_states_0.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0ab6761587e860581258d4333b72e73bc91b305f74c3cb13b7fb8c0db23effee
|
| 3 |
+
size 14408
|
checkpoint-3000/scaler.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:21aba8ed0f38ed1c04994c10a9ca7e9925e55ef2ed51283c43ff8e2cce78585f
|
| 3 |
+
size 988
|
checkpoint-3000/scheduler.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7f2b50dfa1fa51bfa8b457bc01fcd0b96c07c00c3b6e41799fae703435d3cb34
|
| 3 |
+
size 1000
|
checkpoint-3500/controlnet/config.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "ControlNetModel",
|
| 3 |
+
"_diffusers_version": "0.35.0.dev0",
|
| 4 |
+
"act_fn": "silu",
|
| 5 |
+
"addition_embed_type": null,
|
| 6 |
+
"addition_embed_type_num_heads": 64,
|
| 7 |
+
"addition_time_embed_dim": null,
|
| 8 |
+
"attention_head_dim": [
|
| 9 |
+
5,
|
| 10 |
+
10,
|
| 11 |
+
20,
|
| 12 |
+
20
|
| 13 |
+
],
|
| 14 |
+
"block_out_channels": [
|
| 15 |
+
320,
|
| 16 |
+
640,
|
| 17 |
+
1280,
|
| 18 |
+
1280
|
| 19 |
+
],
|
| 20 |
+
"class_embed_type": null,
|
| 21 |
+
"conditioning_channels": 3,
|
| 22 |
+
"conditioning_embedding_out_channels": [
|
| 23 |
+
16,
|
| 24 |
+
32,
|
| 25 |
+
96,
|
| 26 |
+
256
|
| 27 |
+
],
|
| 28 |
+
"controlnet_conditioning_channel_order": "rgb",
|
| 29 |
+
"cross_attention_dim": 1024,
|
| 30 |
+
"down_block_types": [
|
| 31 |
+
"CrossAttnDownBlock2D",
|
| 32 |
+
"CrossAttnDownBlock2D",
|
| 33 |
+
"CrossAttnDownBlock2D",
|
| 34 |
+
"DownBlock2D"
|
| 35 |
+
],
|
| 36 |
+
"downsample_padding": 1,
|
| 37 |
+
"encoder_hid_dim": null,
|
| 38 |
+
"encoder_hid_dim_type": null,
|
| 39 |
+
"flip_sin_to_cos": true,
|
| 40 |
+
"freq_shift": 0,
|
| 41 |
+
"global_pool_conditions": false,
|
| 42 |
+
"in_channels": 4,
|
| 43 |
+
"layers_per_block": 2,
|
| 44 |
+
"mid_block_scale_factor": 1,
|
| 45 |
+
"mid_block_type": "UNetMidBlock2DCrossAttn",
|
| 46 |
+
"norm_eps": 1e-05,
|
| 47 |
+
"norm_num_groups": 32,
|
| 48 |
+
"num_attention_heads": null,
|
| 49 |
+
"num_class_embeds": null,
|
| 50 |
+
"only_cross_attention": false,
|
| 51 |
+
"projection_class_embeddings_input_dim": null,
|
| 52 |
+
"resnet_time_scale_shift": "default",
|
| 53 |
+
"transformer_layers_per_block": 1,
|
| 54 |
+
"upcast_attention": true,
|
| 55 |
+
"use_linear_projection": true
|
| 56 |
+
}
|
checkpoint-3500/controlnet/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ed0356a2df969dbbef4704156b42943d67b9fc1c7a9f3d7319cab42b7c59352f
|
| 3 |
+
size 1456953560
|
checkpoint-3500/optimizer.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6506d931efe0803a6d5c0f4aeb06d5ddecfa3064dc2a396f88eb0d15db5c4a0c
|
| 3 |
+
size 741120954
|
checkpoint-3500/random_states_0.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8f795764acd2b59010fa2456d0cdf019811e24d1907b1bde74251982f8257e59
|
| 3 |
+
size 14344
|
checkpoint-3500/scaler.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9d25c9e5c384ba91142c829ef5432ebc4ae7d8c71f3de723046dd3aa202e08a2
|
| 3 |
+
size 988
|
checkpoint-3500/scheduler.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f13dcf2bd32cc99cb6ecb7a665dde61cfe6707573748c4cbe881eff46fac19fc
|
| 3 |
+
size 1000
|
config.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "ControlNetModel",
|
| 3 |
+
"_diffusers_version": "0.35.0.dev0",
|
| 4 |
+
"act_fn": "silu",
|
| 5 |
+
"addition_embed_type": null,
|
| 6 |
+
"addition_embed_type_num_heads": 64,
|
| 7 |
+
"addition_time_embed_dim": null,
|
| 8 |
+
"attention_head_dim": [
|
| 9 |
+
5,
|
| 10 |
+
10,
|
| 11 |
+
20,
|
| 12 |
+
20
|
| 13 |
+
],
|
| 14 |
+
"block_out_channels": [
|
| 15 |
+
320,
|
| 16 |
+
640,
|
| 17 |
+
1280,
|
| 18 |
+
1280
|
| 19 |
+
],
|
| 20 |
+
"class_embed_type": null,
|
| 21 |
+
"conditioning_channels": 3,
|
| 22 |
+
"conditioning_embedding_out_channels": [
|
| 23 |
+
16,
|
| 24 |
+
32,
|
| 25 |
+
96,
|
| 26 |
+
256
|
| 27 |
+
],
|
| 28 |
+
"controlnet_conditioning_channel_order": "rgb",
|
| 29 |
+
"cross_attention_dim": 1024,
|
| 30 |
+
"down_block_types": [
|
| 31 |
+
"CrossAttnDownBlock2D",
|
| 32 |
+
"CrossAttnDownBlock2D",
|
| 33 |
+
"CrossAttnDownBlock2D",
|
| 34 |
+
"DownBlock2D"
|
| 35 |
+
],
|
| 36 |
+
"downsample_padding": 1,
|
| 37 |
+
"encoder_hid_dim": null,
|
| 38 |
+
"encoder_hid_dim_type": null,
|
| 39 |
+
"flip_sin_to_cos": true,
|
| 40 |
+
"freq_shift": 0,
|
| 41 |
+
"global_pool_conditions": false,
|
| 42 |
+
"in_channels": 4,
|
| 43 |
+
"layers_per_block": 2,
|
| 44 |
+
"mid_block_scale_factor": 1,
|
| 45 |
+
"mid_block_type": "UNetMidBlock2DCrossAttn",
|
| 46 |
+
"norm_eps": 1e-05,
|
| 47 |
+
"norm_num_groups": 32,
|
| 48 |
+
"num_attention_heads": null,
|
| 49 |
+
"num_class_embeds": null,
|
| 50 |
+
"only_cross_attention": false,
|
| 51 |
+
"projection_class_embeddings_input_dim": null,
|
| 52 |
+
"resnet_time_scale_shift": "default",
|
| 53 |
+
"transformer_layers_per_block": 1,
|
| 54 |
+
"upcast_attention": true,
|
| 55 |
+
"use_linear_projection": true
|
| 56 |
+
}
|
diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3f1bde942cee8cf1cc3718077d130be06b71d5fa26329b203fa05e67b1d3eaca
|
| 3 |
+
size 1456953560
|
logs/train_controlnet/1751709967.0118759/events.out.tfevents.1751709967.baa2ca0a8200.123.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e1166ed8a0b5aa6a471234975b9bf86db74b2d2523d39ad8d7dc369e350cc881
|
| 3 |
+
size 2416
|
logs/train_controlnet/1751709967.0134513/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: 3750
|
| 30 |
+
mixed_precision: fp16
|
| 31 |
+
num_train_epochs: 10
|
| 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: null
|
| 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.1751709966.baa2ca0a8200.123.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a9e866ff784af882d095664849e66e00083d96b12d6ba6da788936b414a4e746
|
| 3 |
+
size 629574
|