diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

Unused parameters in scheduler `init`'s

Open natolambert opened this issue 2 years ago • 12 comments

What API design would you like to have changed or added to the library? Why?

I see some of the schedulers had these parameters added to init

        trained_betas: Optional[np.ndarray] = None,
        timestep_values: Optional[np.ndarray] = None,

I'm guessing the first is an option to directly pass betas when creating the scheduler, but what is timestep_values for? I didn't see any uses.

I would like to regularize these (e.g. seems like all DDPM -like schedulers can use trained_betas pretty easily)

Can easily address this while completing #376.

natolambert avatar Sep 07 '22 01:09 natolambert

Is this issues still relevant? Think you are right indeed and we can remove such parameters

patrickvonplaten avatar Sep 13 '22 15:09 patrickvonplaten

To add, I keep getting this warning/log with default example txt2img and img2img pipe. {'trained_betas'} was not found in config. Values will be initialized to default values.

hafiidz avatar Sep 23 '22 06:09 hafiidz

I think I have updated all the unused parameters throughout documentation changes.

RE @Hafiidz 's point, I think that is because the config on the hub is missing the entry? I'm not 100% sure. Future model versions will likely address this.

natolambert avatar Sep 23 '22 15:09 natolambert

@Hafiidz,

That's good feedback, I think we should relax the warning to a logger.info statement to make for better user experience. @anton-l do you have a spare minute to take a look here?

patrickvonplaten avatar Sep 27 '22 10:09 patrickvonplaten

@anton-l @patil-suraj thoughts on this issue? Should we remove those parameters (timestep_values, trained_betas) for now?

patrickvonplaten avatar Oct 24 '22 20:10 patrickvonplaten

@patrickvonplaten Yes, those were added for BDDM which we don't have now, so I think it's fine to remove them now.

patil-suraj avatar Oct 26 '22 15:10 patil-suraj

@anton-l could you take a look?

patrickvonplaten avatar Oct 27 '22 08:10 patrickvonplaten

Not sure about removing trained_betas, because they are functioning as designed, and someone might be using them already. Gently deprecating them is an option, but only if we don't have plans for pipelines that need them. @patil-suraj is BDDM on our roadmap?

anton-l avatar Oct 27 '22 12:10 anton-l

Have we seen any example using trained_betas? If not then I think should be fine to remove it.

BDDM would be nice to have, but I don't have much bandwidth for next 2 weeks to work on it. Maybe @kashif after you are done with notes2audio :) Would be happy to help

patil-suraj avatar Oct 27 '22 13:10 patil-suraj

What's BDDM?

natolambert avatar Oct 27 '22 18:10 natolambert

https://github.com/tencent-ailab/bddm speech model

kashif avatar Oct 27 '22 18:10 kashif

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

github-actions[bot] avatar Nov 21 '22 15:11 github-actions[bot]