mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
ledits fix image resize
This commit is contained in:
+3
-3
@@ -36,8 +36,6 @@ class Script(scripts.Script):
|
||||
if image is None or len(image) == 0:
|
||||
shared.log.error('LEdits: no init_images')
|
||||
return None
|
||||
else:
|
||||
image = image[0]
|
||||
if shared.sd_model_type != 'sd' and shared.sd_model_type != 'sdxl':
|
||||
shared.log.error(f'LEdits: invalid model type: {shared.sd_model_type}')
|
||||
return None
|
||||
@@ -59,8 +57,10 @@ class Script(scripts.Script):
|
||||
|
||||
shared.sd_model.scheduler = diffusers.DPMSolverMultistepScheduler.from_config(shared.sd_model.scheduler.config, algorithm_type="sde-dpmsolver++", solver_order=2) # ledits is very picky
|
||||
p.sampler_name = 'Default'
|
||||
p.init() # run init early to take care of resizing
|
||||
|
||||
invert_args = {
|
||||
'image': image,
|
||||
'image': p.init_images[0],
|
||||
'source_prompt': p.prompt,
|
||||
'source_guidance_scale': p.cfg_scale,
|
||||
'num_inversion_steps': p.steps,
|
||||
|
||||
Reference in New Issue
Block a user