yamildiego commited on
Commit
1887efa
·
1 Parent(s): fb4fa24

load externally control net

Browse files
checkpoints/ControlNetModel/config.json DELETED
@@ -1,57 +0,0 @@
1
- {
2
- "_class_name": "ControlNetModel",
3
- "_diffusers_version": "0.21.2",
4
- "_name_or_path": "/mnt/nj-aigc/usr/guiwan/workspace/diffusion_output/face_xl_ipc_v4_2_XiezhenAnimeForeigner/checkpoint-150000/ControlNetModel",
5
- "act_fn": "silu",
6
- "addition_embed_type": "text_time",
7
- "addition_embed_type_num_heads": 64,
8
- "addition_time_embed_dim": 256,
9
- "attention_head_dim": [
10
- 5,
11
- 10,
12
- 20
13
- ],
14
- "block_out_channels": [
15
- 320,
16
- 640,
17
- 1280
18
- ],
19
- "class_embed_type": null,
20
- "conditioning_channels": 3,
21
- "conditioning_embedding_out_channels": [
22
- 16,
23
- 32,
24
- 96,
25
- 256
26
- ],
27
- "controlnet_conditioning_channel_order": "rgb",
28
- "cross_attention_dim": 2048,
29
- "down_block_types": [
30
- "DownBlock2D",
31
- "CrossAttnDownBlock2D",
32
- "CrossAttnDownBlock2D"
33
- ],
34
- "downsample_padding": 1,
35
- "encoder_hid_dim": null,
36
- "encoder_hid_dim_type": null,
37
- "flip_sin_to_cos": true,
38
- "freq_shift": 0,
39
- "global_pool_conditions": false,
40
- "in_channels": 4,
41
- "layers_per_block": 2,
42
- "mid_block_scale_factor": 1,
43
- "norm_eps": 1e-05,
44
- "norm_num_groups": 32,
45
- "num_attention_heads": null,
46
- "num_class_embeds": null,
47
- "only_cross_attention": false,
48
- "projection_class_embeddings_input_dim": 2816,
49
- "resnet_time_scale_shift": "default",
50
- "transformer_layers_per_block": [
51
- 1,
52
- 2,
53
- 10
54
- ],
55
- "upcast_attention": null,
56
- "use_linear_projection": true
57
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
checkpoints/ControlNetModel/diffusion_pytorch_model.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:c8127be9f174101ebdafee9964d856b49b634435cf6daa396d3f593cf0bbbb05
3
- size 2502139136
 
 
 
 
checkpoints/ip-adapter.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:02b3618e36d803784166660520098089a81388e61a93ef8002aa79a5b1c546e1
3
- size 1691134141
 
 
 
 
handler.py CHANGED
@@ -34,6 +34,8 @@ class EndpointHandler():
34
  def __init__(self, model_dir):
35
  print("Loading model from", model_dir)
36
 
 
 
37
  face_adapter = f"./checkpoints/ip-adapter.bin"
38
  controlnet_path = f"./checkpoints/ControlNetModel"
39
 
 
34
  def __init__(self, model_dir):
35
  print("Loading model from", model_dir)
36
 
37
+ hf_hub_download(repo_id="InstantX/InstantID", filename="ControlNetModel/config.json", local_dir="./checkpoints")
38
+
39
  face_adapter = f"./checkpoints/ip-adapter.bin"
40
  controlnet_path = f"./checkpoints/ControlNetModel"
41