DPS2022 / diffusion-posterior-sampling

Official pytorch repository for "Diffusion Posterior Sampling for General Noisy Inverse Problems"
https://dps2022.github.io/diffusion-posterior-sampling-page/
399 stars 44 forks source link

How to train it? #3

Open zhangbaijin opened 1 year ago

ProCommiter commented 1 year ago

Hi, I was wondering if the authors will be releasing on how to train the models for our specific datasets or is it not necessary at all? Thanks.

TingdiRen commented 1 year ago

Hi, I was wondering if the authors will be releasing on how to train the models for our specific datasets or is it not necessary at all? Thanks.

I'm not the offical author :) What's the specific dataset mean? datasets for super-resolution/ deblurring or else? In fact, you just need to train u-net for uncondition diffusion model with the target images' dataset (e.g. deblurred image). Besides, if you have any differentiable network as the forward operator, then you can use the author's method to solve the inverse problem. Anyway, the actual performance cannot attach to my expectation, but I still appreciate the contribution of author.

ProCommiter commented 1 year ago

Hi, I was wondering if the authors will be releasing on how to train the models for our specific datasets or is it not necessary at all? Thanks.

I'm not the offical author :) What's the specific dataset mean? datasets for super-resolution/ deblurring or else? In fact, you just need to train u-net for uncondition diffusion model with the target images' dataset (e.g. deblurred image). Besides, if you have any differentiable network as the forward operator, then you can use the author's method to solve the inverse problem. Anyway, the actual performance cannot attach to my expectation, but I still appreciate the contribution of author.

For SR!

DPS2022 commented 1 year ago

Hello @ProCommiter @zhangbaijin,

As @TingdiRen mentioned, you can use any diffusion model classified as VPSDE (the assumption in the paper). Our code is written based on guided-diffusion by openai.

Thus, to use this repository directly for other tasks, we recommend you train the diffusion model using https://github.com/openai/guided-diffusion with your own dataset.

xiximelon commented 11 months ago

@DPS2022 hello! could you please provide the parameter setting when training the diffusion model because the setting varies much in https://github.com/openai/guided-diffusion Here is an example for unconditional imagenet64,could you please provide the parameter on which FFHQ is trained MODEL_FLAGS="--image_size 64 --num_channels 128 --num_res_blocks 3 --learn_sigma True" DIFFUSION_FLAGS="--diffusion_steps 4000 --noise_schedule cosine" TRAIN_FLAGS="--lr 1e-4 --batch_size 128" Thanks!

wst2333 commented 10 months ago

@DPS2022 hello! could you please provide the parameter setting when training the diffusion model because the setting varies much in https://github.com/openai/guided-diffusion Here is an example for unconditional imagenet64,could you please provide the parameter on which FFHQ is trained MODEL_FLAGS="--image_size 64 --num_channels 128 --num_res_blocks 3 --learn_sigma True" DIFFUSION_FLAGS="--diffusion_steps 4000 --noise_schedule cosine" TRAIN_FLAGS="--lr 1e-4 --batch_size 128" Thanks!

哥们你知道了吗?知道了能告诉我一下不/(ㄒoㄒ)/~~