validate and fix all refiner workflows

This commit is contained in:
Vladimir Mandic
2024-03-02 10:01:22 -05:00
parent dc8ce0723d
commit 558463aeaf
5 changed files with 18 additions and 20 deletions
+2 -2
View File
@@ -561,8 +561,8 @@ def process_diffusers(p: processing.StableDiffusionProcessing):
)
shared.state.sampling_steps = refiner_args['num_inference_steps']
try:
if 'requires_aesthetics_score' in shared.sd_refiner.config:
shared.sd_refiner.register_to_config(requires_aesthetics_score=shared.opts.diffusers_aesthetics_score)
if 'requires_aesthetics_score' in shared.sd_refiner.config: # sdxl-model needs false and sdxl-refiner needs true
shared.sd_refiner.register_to_config(requires_aesthetics_score = getattr(shared.sd_refiner, 'tokenizer', None) is None)
refiner_output = shared.sd_refiner(**refiner_args) # pylint: disable=not-callable
if isinstance(refiner_output, dict):
refiner_output = SimpleNamespace(**refiner_output)