better sigmas for sd1.5 as refiner

This commit is contained in:
lllyasviel
2023-10-12 18:31:42 -07:00
committed by GitHub
parent 26fe88d8a6
commit 3b9266e848
4 changed files with 49 additions and 33 deletions
+4
View File
@@ -11,6 +11,7 @@ from fcbh.samplers import resolve_areas_and_cond_masks, wrap_model, calculate_st
current_refiner = None
refiner_switch_step = -1
history_record = None
@torch.no_grad()
@@ -127,6 +128,9 @@ def sample_hacked(model, noise, positive, negative, cfg, device, sampler, sigmas
return
def callback_wrap(step, x0, x, total_steps):
global history_record
if isinstance(history_record, list):
history_record.append((step, x0, x))
if step == refiner_switch_step and current_refiner is not None:
refiner_switch()
if callback is not None: