mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
lora: keep parsed network data through pipeline
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
+6
-6
@@ -301,14 +301,14 @@ def dlss(p: processing.StableDiffusionProcessing | None, pp: processing.Processe
|
||||
t0 = time.time()
|
||||
if p:
|
||||
p.extra_generation_params["DLSSSuperSample"] = True
|
||||
log.debug(f'DLSS: method=SuperSample quality="{ss_vsr_quality}" mode="{ss_size_mode}" scale={ss_scale_factor} width={ss_width} height={ss_height}')
|
||||
log.info(f'DLSS: method=SuperSample quality="{ss_vsr_quality}" mode="{ss_size_mode}" scale={ss_scale_factor} width={ss_width} height={ss_height}')
|
||||
if ss_append:
|
||||
originals.extend(current_images)
|
||||
output = supersample(pkg_path, current_images, ss_vsr_quality, ss_size_mode, ss_scale_factor, ss_width, ss_height)
|
||||
if debug:
|
||||
log.trace(f'DLSS: method=SuperSample images={len(output) if output else 0} time={time.time() - t0:.3f}')
|
||||
if output:
|
||||
images.extend(output)
|
||||
images = output
|
||||
current_images = output
|
||||
t.ts('supersample', t0)
|
||||
|
||||
@@ -318,14 +318,14 @@ def dlss(p: processing.StableDiffusionProcessing | None, pp: processing.Processe
|
||||
t0 = time.time()
|
||||
if p:
|
||||
p.extra_generation_params["DLSSNeuralRender"] = True
|
||||
log.debug(f'DLSS: method=NeuralRender style={nr_style} intensity={nr_intensity} tone={nr_local_tone} structure={nr_local_structure} skin={nr_skin_structure} scale={nr_upscaling_factor} preset={nr_preset} mask={nr_automatic_mask} model={nr_model_preset}')
|
||||
log.info(f'DLSS: method=NeuralRender style={nr_style} intensity={nr_intensity} tone={nr_local_tone} structure={nr_local_structure} skin={nr_skin_structure} scale={nr_upscaling_factor} preset={nr_preset} mask={nr_automatic_mask} model={nr_model_preset}')
|
||||
if nr_append:
|
||||
originals.extend(current_images)
|
||||
output = neuralrender(pkg_path, current_images, nr_style, nr_intensity, nr_local_tone, nr_local_structure, nr_skin_structure, nr_upscaling_factor, nr_preset, nr_automatic_mask, nr_model_preset)
|
||||
if debug:
|
||||
log.trace(f'DLSS: method=NeuralRender images={len(output) if output else 0} time={time.time() - t0:.3f}')
|
||||
if output:
|
||||
images.extend(output)
|
||||
images = output
|
||||
current_images = output
|
||||
t.ts('neuralrender', t0)
|
||||
|
||||
@@ -333,12 +333,12 @@ def dlss(p: processing.StableDiffusionProcessing | None, pp: processing.Processe
|
||||
t0 = time.time()
|
||||
if p:
|
||||
p.extra_generation_params["DLSSFrameGen"] = True
|
||||
log.debug(f'DLSS: method=FrameGen source={fg_source_fps} target={fg_target_fps} engine={fg_engine}')
|
||||
log.info(f'DLSS: method=FrameGen source={fg_source_fps} target={fg_target_fps} engine={fg_engine}')
|
||||
output = framegen(pkg_path, current_images, fg_source_fps, fg_target_fps, fg_engine)
|
||||
if debug:
|
||||
log.trace(f'DLSS: method=FrameGen images={len(output) if output else 0} time={time.time() - t0:.3f}')
|
||||
if output:
|
||||
images.extend(output)
|
||||
images = output
|
||||
current_images = output
|
||||
t.ts('framegen', t0)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import torch
|
||||
import transformers
|
||||
import gradio as gr
|
||||
from PIL import Image
|
||||
from modules import scripts_manager, shared, devices, errors, processing, sd_models, sd_modules, timer
|
||||
from modules import scripts_manager, shared, devices, errors, processing, sd_models, sd_modules, timer, extra_networks
|
||||
from modules import ui_control_helpers
|
||||
from modules.sd_offload_aux import register_aux, deregister_aux, move_aux_to_gpu, offload_aux
|
||||
from modules.logger import log
|
||||
@@ -732,6 +732,8 @@ class PromptEnhanceScript(scripts_manager.Script):
|
||||
p.prompt = shared.prompt_styles.apply_styles_to_prompt(p.prompt, p.styles)
|
||||
p.negative_prompt = shared.prompt_styles.apply_negative_styles_to_prompt(p.negative_prompt, p.styles)
|
||||
shared.prompt_styles.apply_styles_to_extra(p)
|
||||
prompts, p.network_data = extra_networks.parse_prompts([p.prompt], p.network_data)
|
||||
p.prompt = prompts[0]
|
||||
p.styles = []
|
||||
jobid = shared.state.begin('LLM')
|
||||
p.extra_generation_params['LLM'] = get_model_repo_from_display(llm_model)
|
||||
|
||||
Reference in New Issue
Block a user