Return the default guidance scale for a given SD version.
(version: StableDiffusionVersion)
| 668 | |
| 669 | /// Return the default guidance scale for a given SD version. |
| 670 | pub(crate) fn default_guidance_scale(version: StableDiffusionVersion) -> f64 { |
| 671 | match version { |
| 672 | StableDiffusionVersion::V1_5 |
| 673 | | StableDiffusionVersion::V2_1 |
| 674 | | StableDiffusionVersion::Xl => 7.5, |
| 675 | StableDiffusionVersion::Turbo => 0., |
| 676 | } |
| 677 | } |
| 678 | |
| 679 | /// Return the default number of sampling steps for a given SD version. |
| 680 | pub(crate) fn default_n_steps(version: StableDiffusionVersion) -> usize { |
no outgoing calls