fix a bug that caused to pop all v2v conditions during training#855
fix a bug that caused to pop all v2v conditions during training#855hadipash wants to merge 2 commits intohpcaitech:mainfrom
v2v conditions during training#855Conversation
v2v conditionsv2v conditions during training
|
@hadipash Could you please specify any exact bugs this usage causes? Poping a config might be useful if we don't want it to be consumed twice (but I'm not sure if it's the case here) |
|
@botbw It doesn't cause bugs with the current configs (as they use Open-Sora/opensora/utils/train.py Lines 214 to 221 in d0cd5ac The popping above is supposed to be local and applied to a specific batch, rather than modifying the global configuration. |
@hadipash I see, but I think the caller should be aware of potential modifications when executing this (although surely it should be documented), there is no optimal design (IMO) as python doesn't have any ownership concept. |
|
@botbw Right. Moved the dictionary copying under |
|
@zhengzangw A tiny change for the robustness of open-sourced code. |
This PR fixes condition config mutation in
prepare_visual_conditionduring training. Specifically, because dictionaries are passed by reference, even a single short video would be enough to completely removev2v_head,v2v_tail,v2v_head_easy, andv2v_tail_easyfrom the condition config.