Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Worse in high guidance scale #50

Open
yuhuUSTC opened this issue Jan 18, 2024 · 4 comments
Open

Worse in high guidance scale #50

yuhuUSTC opened this issue Jan 18, 2024 · 4 comments

Comments

@yuhuUSTC
Copy link

Dear authors,
Thank you for sharing this great work and open source!
When following this work, I found that DPM-solver++ performs worse than DDIM under high classifier guidance scale, eg, scale=8 or 16. Concretely, under scale=8, the performance of DPM-solver++ approaches DDIM, and under scale=16, the performance of DDIM > DPM-solver++ > UniPC. Same issues alsp appy to UniPC.

Config: DPM-solver++ 2M, 50k samples

This contradicts the reported results in the paper.
Thank you for your explanation and help.

@LuChengTHU
Copy link
Owner

Generally speaking, higher guidance scales will make the ODE ill-conditioned and higher-order solvers will become more and more unstable. The instability issue will be somehow eased with DPM++ because the property of data-pred model, but it cannot address it. So in my original paper I also applied dynamic thresholding to further reduce the condition numbers.

@zxk72
Copy link

zxk72 commented May 6, 2024

Hey fellows, really good work and thanks for sharing the code.
@LuChengTHU Hello, I applied dpm-solver to guided diffusion, but the results were not satisfactory. Is this the same question you answered above? Would it be better to use SDE-based dpm-solver? Or is there a better solution? Looking forward for your reply, thank you!

@LuChengTHU
Copy link
Owner

Hi @zxk72 , did you use these commands?:

# ImageNet256 with classifier guidance (large guidance scale) example
data="imagenet256_guided"
scale="8.0"
sampleMethod='dpmsolver++'
type="dpmsolver"
steps="20"
DIS="time_uniform"
order="2"
method="multistep"
workdir="experiments/"$data"/"$sampleMethod"_"$method"_order"$order"_"$steps"_"$DIS"_scale"$scale"_type-"$type"_thresholding"
CUDA_VISIBLE_DEVICES=$DEVICES python main.py --config $data".yml" --exp=$workdir --sample --fid --timesteps=$steps --eta 0 --ni --skip_type=$DIS --sample_type=$sampleMethod --dpm_solver_order=$order --dpm_solver_method=$method --dpm_solver_type=$type --port 12350 --scale=$scale --thresholding

@zxk72
Copy link

zxk72 commented May 7, 2024

@LuChengTHU thank you for your reply! Sorry, I'm not using the example you provided. It is a diffusion medical segmentation project called MedSegDiff, which uses guided diffusion. The results after using dpm-solver have some noise, which is worse than the results without using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants