Skip to content

How to use the model trained with dreambooth? #1824

Answered by Z-Fran
wangqiang9 asked this question in How-to
Discussion options

You must be logged in to vote

Use sd config to infer:

from mmagic.apis import MMagicInferencer
model_ckpt = './work_dirs/dreambooth/iter_100.pth'
model_config = './configs/stable_diffusion/stable-diffusion_ddim_denoisingunet.py'

sd_inferencer = MMagicInferencer(model_name='stable_diffusion',
                                 model_config=model_config,
                                 model_ckpt=model_ckpt)
text_prompts = 'a sks dog on the desk'
result_out_dir = 'output/result.png'
sd_inferencer.infer(text=text_prompts, result_out_dir=result_out_dir)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by wangqiang9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
How-to
Labels
None yet
2 participants