AbstractPhil commited on
Commit
533f372
·
verified ·
1 Parent(s): e5d012d

Create configuration_flow_match.py

Browse files
Files changed (1) hide show
  1. configuration_flow_match.py +47 -0
configuration_flow_match.py ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Configuration for FlowMatchRelay — HuggingFace compatible.
3
+
4
+ Usage:
5
+ from transformers import AutoConfig
6
+ config = AutoConfig.from_pretrained("AbstractPhil/geolip-diffusion-proto", trust_remote_code=True)
7
+ """
8
+
9
+ from transformers import PretrainedConfig
10
+
11
+
12
+ class FlowMatchRelayConfig(PretrainedConfig):
13
+ model_type = "flow_match_relay"
14
+
15
+ def __init__(
16
+ self,
17
+ in_channels=3,
18
+ base_channels=64,
19
+ channel_mults=(1, 2, 4),
20
+ n_classes=10,
21
+ cond_dim=256,
22
+ use_relay=True,
23
+ relay_patch_dim=16,
24
+ relay_n_anchors=16,
25
+ relay_n_phases=3,
26
+ relay_pw_hidden=32,
27
+ relay_gate_init=-3.0,
28
+ relay_mode="channel",
29
+ image_size=32,
30
+ n_sample_steps=50,
31
+ **kwargs,
32
+ ):
33
+ self.in_channels = in_channels
34
+ self.base_channels = base_channels
35
+ self.channel_mults = list(channel_mults)
36
+ self.n_classes = n_classes
37
+ self.cond_dim = cond_dim
38
+ self.use_relay = use_relay
39
+ self.relay_patch_dim = relay_patch_dim
40
+ self.relay_n_anchors = relay_n_anchors
41
+ self.relay_n_phases = relay_n_phases
42
+ self.relay_pw_hidden = relay_pw_hidden
43
+ self.relay_gate_init = relay_gate_init
44
+ self.relay_mode = relay_mode
45
+ self.image_size = image_size
46
+ self.n_sample_steps = n_sample_steps
47
+ super().__init__(**kwargs)