mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
wip: add tcd sampler
adapted code from https://github.com/comfyanonymous/ComfyUI/pull/3370 TODO: check if virtual scheduler tcd is needed for using sampling_base ModelSamplingDiscreteDistilled or if it's better to use sgm_uniform directly without patching
This commit is contained in:
@@ -773,19 +773,19 @@ def worker():
|
||||
final_sampler_name = sampler_name
|
||||
final_scheduler_name = scheduler_name
|
||||
|
||||
if scheduler_name == 'lcm':
|
||||
if scheduler_name in ['lcm', 'tcd']:
|
||||
final_scheduler_name = 'sgm_uniform'
|
||||
if pipeline.final_unet is not None:
|
||||
pipeline.final_unet = core.opModelSamplingDiscrete.patch(
|
||||
pipeline.final_unet,
|
||||
sampling='lcm',
|
||||
sampling=scheduler_name,
|
||||
zsnr=False)[0]
|
||||
if pipeline.final_refiner_unet is not None:
|
||||
pipeline.final_refiner_unet = core.opModelSamplingDiscrete.patch(
|
||||
pipeline.final_refiner_unet,
|
||||
sampling='lcm',
|
||||
sampling=scheduler_name,
|
||||
zsnr=False)[0]
|
||||
print('Using lcm scheduler.')
|
||||
print(f'Using {scheduler_name} scheduler.')
|
||||
|
||||
async_task.yields.append(['preview', (13, 'Moving model to GPU ...', None)])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user