Open AmericanPresidentJimmyCarter opened 1 year ago
Adding something like the following piece of code to somewhere near the start (for DDIM and DPMSolverSinglestep schedulers just after prev_timestep
is defined) of the __call__
function of each individual scheduler seems to fix this issue:
if model_output.shape[1] == sample.shape[1] * 2:
model_output, _ = torch.split(model_output, sample.shape[1], dim=1)
Still does not work. Output is very distorted.
Yes we should try to get those working :heart_eyes: Think we have some first PRs here: https://github.com/huggingface/diffusers/pull/3314
Hi @AmericanPresidentJimmyCarter , Could you please give me your prompt and random seed for reproducing the distorted image?
That image was produced prior to your merge request.
And, actually, the issue seems to have been that the default parameters for the scheduler were problem. I am unsure why they are set the way they are, but even for SD DPMSolverMultistepScheduler()
outputs complete garbage.
This configuration, by contrast, seems to produce normal images for SD.
scheduler = DPMSolverMultistepScheduler(
beta_start=0.00085,
beta_end=0.012,
beta_schedule="scaled_linear",
num_train_timesteps=1000,
trained_betas=None,
thresholding=False,
algorithm_type="dpmsolver++",
solver_type="midpoint",
lower_order_final=True,
)
I am unsure why I needed to Google this to be able to use this scheduler at all -- it seems like maybe there should be a class method like preset_for
where you can select the right kwargs for your respective model? And, where do I find the kwargs for IF?
@AmericanPresidentJimmyCarter you can easily load the correct scheduler config as shown here: https://github.com/huggingface/diffusers/pull/3314#issuecomment-1533036833
Just doing:
DPMSolverMultistepScheduler.from_pretrained("DeepFloyd/IF-I-XL-v1.0")
gives you the correct config. Why do you want to instead use the default settings?
Ah, okay -- I did not realise that this function already existed, thanks.
Describe the bug
Attempting to use any non-default scheduler with DeepFloyd IF crashes out like this:
Reproduction
Logs
No response
System Info
py 3.10 diffusers v0.16.1