File tree Expand file tree Collapse file tree 2 files changed +24
-3
lines changed
helpers/data_backend/config Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Original file line number Diff line number Diff line change 22
33from . import validators
44from .base import BaseBackendConfig
5- from .conditioning_image_embed import ConditioningImageEmbedBackendConfig
65from .image import ImageBackendConfig
76from .image_embed import ImageEmbedBackendConfig
87from .text_embed import TextEmbedBackendConfig
98
9+ try : # pragma: no cover - graceful fallback when optional module missing
10+ from .conditioning_image_embed import ConditioningImageEmbedBackendConfig
11+ except ModuleNotFoundError : # pragma: no cover - legacy environments
12+
13+ class ConditioningImageEmbedBackendConfig (ImageEmbedBackendConfig ): # type: ignore[misc]
14+ """Fallback configuration that mirrors ImageEmbed when the specialised class is unavailable."""
15+
16+ def __post_init__ (self ):
17+ super ().__post_init__ ()
18+ self .dataset_type = "conditioning_image_embeds"
19+
20+ @classmethod
21+ def from_dict (cls , backend_dict : dict , args : dict ) -> "ConditioningImageEmbedBackendConfig" :
22+ config = super ().from_dict (backend_dict , args )
23+ config .dataset_type = "conditioning_image_embeds"
24+ return config
25+
26+ def to_dict (self ) -> dict :
27+ payload = super ().to_dict ()
28+ payload ["dataset_type" ] = "conditioning_image_embeds"
29+ return payload
30+
1031__all__ = [
1132 "BaseBackendConfig" ,
1233 "ImageBackendConfig" ,
Original file line number Diff line number Diff line change @@ -1377,7 +1377,7 @@ function trainingWizardComponent() {
13771377 this . answers . group_offload_type = null ;
13781378 this . answers . group_offload_blocks_per_group = null ;
13791379 this . answers . group_offload_use_stream = false ;
1380- this . answers . group_offload_to_disk_path = null ;
1380+ this . answers . group_offload_to_disk_path = '' ;
13811381 } ,
13821382
13831383 ensureFsdpDefaults ( ) {
@@ -1412,7 +1412,7 @@ function trainingWizardComponent() {
14121412 this . answers . fsdp_state_dict_type = null ;
14131413 this . answers . fsdp_cpu_ram_efficient_loading = false ;
14141414 this . answers . fsdp_auto_wrap_policy = null ;
1415- this . answers . fsdp_transformer_layer_cls_to_wrap = null ;
1415+ this . answers . fsdp_transformer_layer_cls_to_wrap = '' ;
14161416 this . answers . context_parallel_size = null ;
14171417 } ,
14181418
You can’t perform that action at this time.
0 commit comments