Fix support for half precision and --upcast-sampling
on non-MPS devices, keep older web UI version support
#178
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#143 was intended for CUDA, ROCm, and MPS rather than just MPS, but users reported issues such as #157 and #163 because they are using old versions of web UI that do not have
cond_cast_unet
. This PR removes the MPS checks, but usesgetattr()
to setcond_cast_unet
and get the value fordtype_unet
so that nothing should break ifcond_cast_unet
ordtype_unet
are not defined in web UI.This also adds a command line option,
--no-half-controlnet
, that allows users to force full precision for the ControlNet models even if web UI is using half precision for the Stable Diffusion models.