Commit 850011f7 authored by novelailab's avatar novelailab

Add get_default_config

parent b2c9a5ee
......@@ -253,6 +253,29 @@ class StableDiffusionModel(nn.Module):
self.prior = VectorAdjustPrior.load_model(config.prior_path).to(self.device)
self.copied_ema = True
@property
def get_default_config(self):
dict_config = {
'steps': 30,
'sampler': "k_euler_ancestral",
'n_samples': 1,
'image': None,
'fixed_code': False,
'ddim_eta': 0.0,
'height': 512,
'width': 512,
'latent_channels': 4,
'downsampling_factor': 8,
'scale': 12.0,
'dynamic_threshold': None,
'seed': None,
'stage_two_seed': None,
'module': None,
'masks': None,
'output': None,
}
return ConfigClass(dict_config)
def fuse_model(self, requires_grad=False):
ema = self.ema
for param in self.model.model.parameters():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment