-
We know that we always fine-tune the unet based on the pre-trained model weights, which can be achieved by using method 'from_pretrained()' to load the weights. However, if we would like to train the model from scratch based on the diffuser repo, how do we implement it? Just input the config file and not use the method 'from_pretrained'? The implemented code for fine-tuning is, |
Beta Was this translation helpful? Give feedback.
Answered by
sayakpaul
Jun 10, 2024
Replies: 1 comment
-
You could do something like: from diffusers import UNet2DConditionModel
config = UNet2DConditionModel.load_config(
"runwayml/stable-diffusion-v1-5", subfolder="unet"
)
unet = UNet2DConditionModel.from_config(config)
assert unet is not None |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
dahui-y
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You could do something like: