Files
hao-ai-lab-FastVideo/opensora/models/diffusion/latte/configuration_base.py
T
LinB203 b57709108a train 1080p video
Former-commit-id: 74625142ef892f9e7fa459b2f98f2f7ae5b36d6a
2024-03-10 18:08:23 +08:00

26 lines
652 B
Python

import json
"""
We are currently working on the abstraction of the code structure,
so there is no content here for the moment.
It will be gradually optimized over time.
Contributions from the open-source community are welcome.
"""
class BaseConfiguration:
def __init__(self, **kwargs):
pass
def to_json_string(self):
json_string = json.dumps(vars(self))
return json_string
def to_dict(self):
return vars(self)
@classmethod
def load_from_file(cls, config_path):
with open(config_path, 'r') as json_file:
config_dict = json.load(json_file)
return cls(**config_dict)