Skip to content

Commit 4961437

Browse files
ryanontheinsidevictorgesBuffMcBigHuge
authored
Accelerated SDXL, IPAdapter, Multi Controlnet, Multi Resolution, Controlnet Preprocessors, Config System (#1)
* initial webcam test * spike * initial test with controlnet * lineart script, controlnet script test * general purpose single controlnet pipe, addnl configs * restore demo script, readme * fix controlnet preprocess, update depth example * add some models to readme for referece * update default lineart controlnet * add tile * multi demo * move examples * remove old script * preprocess optim * gpu prepro * sdturbo and sdxl controlnet # Conflicts: # examples/controlnet/controlnet_webcam_demo.py * sdturbo streamdiffusion controlnet * SDXLTurbo controlnet streamdiffusion * monolithic pipeline refactor * high performance controlnet adaptation demo * consolidate sd1.5 + sdturbo * update examples * replace strength w t_index_list * remove unneeded branching * ignore onnx * sdxl tensor fix * refactor - sdxl broken this is to refactor to follow the existing codebase architecture more closely. with a tight timeline, SDXL support is not a priority. TODO todo: look at state before this commit and fix SDXL * spike * model detection update * reference documents * remove duplicate * trt compiling * yaml update * dynamic controlnet + dynamic conditioning streen * working example multicontrolnet * remove extranneous scrtipt use the regular webcam demo * varying spatial dimensions * remove print statements * remove profiling * image conversions * cached preprocessor * fix overwriting config * phase 2 plan * tensorrt controlnet * remove debug scripts * restore test script * remove async compialtion * batch dimension * batch size detection for controlnets * partial cnet trt - black frames * working controlnet trt * delete test * webcam gui * gui improvement * frame buffer size, delta support * frame buffer delta demo * restrict frame buffer size * notes * demo frame buffer size * clarity * config use denoising batch * remvoe unneeded tensor cloning in controlnet engin * optimizations * optimization * optimize postprocess pipeline * tensorrt buffer allocation * get_controlnet_conditioning cleanup * remove extranneous scripts * update readme * update multi controlnet example * stand alone simple pipeline * remove controlnet config abstraction removes nonessential dataclass abstraction. Streamdiffusion uses dicts * remove demo function * remove legacy demo * update docstrings * update docstring * update readme * stack trace in controlnet fallback * add yolonas pose tensorrt preprocessor * attribution * demo exit behavior * selectable config * video test * mediapipe preprocessor spike * touch * add engine only mode * todo * mediapipe segementation preprocessor * theoretical multi-stage processing plan * tensorrt buffer allocation fix * controlnet support in web demo, partial tunuous support for default pipeline * standard lineart preprocessor spike * standar lineart optimization * simple preprocessing parallelism * live prompt update * realtime tindex list update * add tindex real time update * update interface, tindex list * respect acceleration * remove amorphous yamls * clean up examples and readme * consistent naming convention * config system controlnet agnostic * add additional realtime params * remove notes * respect engine dir in wrapper * respect engine dir in demo * remove antiquated control methods * demo header * parameter update documentation * TODO * remove antiquated method from test script * add optional config to standalone pipeline demo * remove gui demo * use stream resolution * use utility method to load config * respect engine dir * fix variable * duplicate cfg logic, comment reduction * remove duplicative update_controlnet_scale this is in wrapper * remove duplicative get_last_processed_image this is in wrapper.py * remove two dead methods * docstring & comment reduction * remove get input output names dead methods * docstring fluff and comment reduction * remove dead methods * docstring and comment reduction * docstring & comment reduction * remove deprecated method * remove deprecated save_contronet_config * remove unused method * Revert "remove dead methods" This reverts commit 9913223. * docstring & comment reduction * restore update controlnet scale * cleanp docstring and comments * docstring & comment reduction * docstring comment reduction * comment cleanup * readme update * readme file name * update stand alone example * wrapper: Merge with ai-runner and export from lib (#3) * Copy changes from ai-runner wrapper * Remove copied header We're original now * Export StreamDiffusionWrapper for ai-runner So we can avoid copying the whole thing over there. * Move wrapper to main streamdiffusion package * Fix rebase typo * obey config resolution * unet multires trt * controlnet engine naming convention * preprocessor refactor This commit reduces code duplication without changing the public interface or performance. Next steps: more work on consistent GPU first approach BEFORE REFACTOR -------------------------------------------------------------------------------- Preprocessor Avg Time (s) Min (s) Max (s) Std (s) Output Size -------------------------------------------------------------------------------- Passthrough_PIL 0.000 0.000 0.000 0.000 (512, 512) Passthrough_Tensor 0.001 0.000 0.001 0.000 (512, 512) Canny_PIL 0.001 0.001 0.002 0.000 (512, 512) Canny_Tensor 0.001 0.001 0.002 0.000 (512, 512) StandardLineart_PIL 0.003 0.002 0.004 0.001 (512, 512) StandardLineart_Tensor 0.004 0.003 0.004 0.001 (512, 512) Depth_PIL 0.024 0.021 0.028 0.002 (512, 512) Depth_Tensor 0.024 0.022 0.025 0.001 (512, 512) Lineart_PIL 0.157 0.155 0.159 0.002 (512, 512) Lineart_Tensor 0.164 0.158 0.169 0.004 (512, 512) OpenPose_PIL 0.362 0.351 0.368 0.007 (512, 512) OpenPose_Tensor 0.361 0.348 0.371 0.009 (512, 512) MediaPipePose_PIL 0.024 0.024 0.026 0.001 (512, 512) MediaPipePose_Tensor 0.027 0.026 0.029 0.001 (512, 512) MediaPipeSegmentation_PIL 0.004 0.003 0.004 0.001 (512, 512) MediaPipeSegmentation_Tensor 0.006 0.005 0.006 0.000 (512, 512) PoseTensorRT_PIL 0.021 0.020 0.022 0.001 (512, 512) PoseTensorRT_Tensor 0.015 0.015 0.016 0.000 (512, 512) DepthTensorRT_PIL 0.005 0.004 0.006 0.001 (512, 512) DepthTensorRT_Tensor 0.002 0.002 0.002 0.000 (512, 512) AFTER CHANGES Preprocessor Avg Time (s) Min (s) Max (s) Std (s) Output Size -------------------------------------------------------------------------------- Passthrough_PIL 0.000 0.000 0.000 0.000 (512, 512) Passthrough_Tensor 0.000 0.000 0.000 0.000 (512, 512) Canny_PIL 0.001 0.000 0.001 0.000 (512, 512) Canny_Tensor 0.001 0.001 0.002 0.000 (512, 512) StandardLineart_PIL 0.003 0.002 0.004 0.001 (512, 512) StandardLineart_Tensor 0.004 0.004 0.005 0.001 (512, 512) Depth_PIL 0.024 0.022 0.026 0.002 (512, 512) Depth_Tensor 0.024 0.023 0.025 0.001 (512, 512) Lineart_PIL 0.160 0.158 0.164 0.003 (512, 512) Lineart_Tensor 0.160 0.155 0.164 0.003 (512, 512) OpenPose_PIL 0.355 0.352 0.358 0.002 (512, 512) OpenPose_Tensor 0.367 0.346 0.383 0.014 (512, 512) MediaPipePose_PIL 0.024 0.023 0.025 0.001 (512, 512) MediaPipePose_Tensor 0.027 0.026 0.027 0.000 (512, 512) MediaPipeSegmentation_PIL 0.003 0.003 0.004 0.000 (512, 512) MediaPipeSegmentation_Tensor 0.005 0.005 0.006 0.000 (512, 512) PoseTensorRT_PIL 0.021 0.020 0.023 0.001 (512, 512) PoseTensorRT_Tensor 0.016 0.014 0.018 0.002 (512, 512) DepthTensorRT_PIL 0.004 0.004 0.005 0.001 (512, 512) DepthTensorRT_Tensor 0.002 0.002 0.004 0.001 (512, 512) * external preprocessor * move config * update img2img demo import * seed update * provide dummy inputs --------- Co-authored-by: RyanOnTheInside <7623207+ryanontheinside@users.noreply.github.com> * remove pipeline type and clean up model loading * remove infer_model_type * remove infer_controlnet_type * remove pipeline_type from example configs * remove ppipeline_type from demo * documentation * remove pipeline from config * remove pipline_type from demo * remove resolution * remove .lower * happy path * Copy changes from ai-runner wrapper * Remove copied header We're original now * Move wrapper to main streamdiffusion package * obey config resolution * move config * use direct instead of refelction * prompt blending working * seed blending * prompt and seed blending * interface update * support text to image configs * fix dupes from rebase * add optional weighting for prompt and seed * soft edge preprocessor * HED preprocessor * remove custom network * update public interface and use it * remove overly defensive checks * complete parameter updater forwarding methods * update dynamic controls * cleanup prints * vectorize middle joints * precompute edges and colors * reduce cuda available system calls * prediction list and tuple creation * reduce detection resolution * vectorize * video mode, gpu delegate * pipelined processing this results in 20%-30% fps improvement when using four controlnets * orchestration module * add normalize consistency * generic cache stats and normalization * unified blending control * rename interpolation method to prompt interpolation method * forward legacy single prompt * Set "normalize weight" params w/ update params func (cumulo-autumn#24) * Multi-Resolution (Pipeline Reload) + WebUI Upgrades (cumulo-autumn#15) * Added api-only mode to server, update svelte vite and frontend packages, built multiresolution support with tensorrt, built resolution picker. * Added realtime resolution updates. * Small fix. * Controlnet work. * ControlNet testing. * Rebuilt resolution swapping by restarting pipeline, re-added prompt input to UI for testing. * Fix missing file. * Fix to config updating the resolution. * fix input profiles * restore sdxl functionality * remove legacy prompt box * fix prompt blending * unified blending control and fixes * Set dynamic size from 384-1024 with opt at 704. * updater: Remove "dynamic" resolution update logic * Remove debug logs * Remove more debug logs... --------- Co-authored-by: RyanOnTheInside <7623207+ryanontheinside@users.noreply.github.com> Co-authored-by: Victor Elias <victorgelias@gmail.com> Co-authored-by: Victor Elias <victor@livepeer.org> * configurable pytorch fallback * remove legacy prompt box # Conflicts: # demo/realtime-img2img/frontend/src/lib/components/PromptBlendingControl.svelte # demo/realtime-img2img/frontend/src/routes/+page.svelte * fix prompt blending # Conflicts: # demo/realtime-img2img/frontend/src/lib/components/SeedBlendingControl.svelte # demo/realtime-img2img/main.py * unified blending control and fixes # Conflicts: # demo/realtime-img2img/frontend/src/lib/components/BlendingControl.svelte * rename interpolation method * remove legacy files * IPAdapters + Controlnet and Tensorrt for SDXL (cumulo-autumn#40) * testing * text to image working * img2img working * example update * update examples * successful engine build * ipadapter tensorrt acceleration * remove test scripts * remove test script * safe import * update test script * working * button up * bake with strength | name engine dir * cleanup wrapper * cache embeddings * comment some prints * backtrack multiple ipadapter support this will be done in subsequent phase * remove test scripts * dynamic ipadapter token * plus support * rm erroneous commit * move config * erroneous comment * demo spike * prompts working * composable conditioning wrapper * bugfix wrapper * wrapper fix * remove print statement * fix prompt embeds * add ipadapter support to demo * remove extranneous exports * remove extranneous backwards compat * remove extrannous controlnet exports * comment cleanup * rm ipadapter readme * cleanup prints * remove debug script * cleanup config logic * remove defensive import handling * remove example bloat * remove extranneous demo * rm print statements * remove prints, update todo * fix config upload * fix style image update * remove copywritten image * leverage preprocessor system * remove print statements * prompt update perf fix * remove heuristic ipadapter detection # Conflicts: # src/streamdiffusion/ipadapter/base_ipadapter_pipeline.py * Ryan/feat/02 ipadapter on sdxl (cumulo-autumn#32) * merge sdxl Merged changes from ryan/feat/ipadapter-on-sdxl branch with marco/feat/sdxl branch, resolving conflicts in: src/streamdiffusion/pipeline.py: Integrated SDXL UNet calling conventions with comprehensive conditioning support, retained SDXL added_cond_kwargs handling and TensorRT vs PyTorch UNet detection demo/realtime-img2img/main.py: Combined IPAdapter info response with resolution calculation, merged pipeline creation logic for both IPAdapter and SDXL support src/streamdiffusion/acceleration/tensorrt/__init__.py: Unified embedding dimension detection for both SDXL (2048) and SD1.5 (768), integrated IPAdapter and ControlNet TensorRT support src/streamdiffusion/controlnet/base_controlnet_pipeline.py: Merged ControlNet conditioning logic with SDXL compatibility src/streamdiffusion/stream_parameter_updater.py: Integrated IPAdapter embedding enhancers with parameter update system src/streamdiffusion/wrapper.py: Resolved TensorRT engine compilation conflicts, unified IPAdapter and SDXL model loading paths * handle sdxl in conditioning wrapper * image encoder download fix * remove extranneous ipadapter pipeline abstraction * remove heuristic ipadapter detection * consolidate model detection * Ryan/feat/03 controlnet on ipadapter on sdxl (cumulo-autumn#33) * controlnet enabled unet engine * remove prints * cnet engine support * consolidate utilities logging * uncomment fallback * consolidate sdxl unet wrapper * Fixed model detection. * Rebuilt model detection mechanism, cleanup. * Removal of fluff. * More reliance on detect_model function, fix of SDXL detection for onnx export. * Bit of cleanup and additional logging. * Reverted controlnet/ipadapter model detection to original functions. * add controlnet model detection * add controlnet model detection to export --------- Co-authored-by: BuffMcBigHuge <marco@bymar.co> --------- Co-authored-by: BuffMcBigHuge <marco@bymar.co> --------- Co-authored-by: RyanOnTheInside <7623207+ryanontheinside@users.noreply.github.com> Co-authored-by: BuffMcBigHuge <marco@bymar.co> * rename to export wrapper convention * move sdxl controlnet export * rename conditioning wrapper * rename controlnet_wrapper.py * rename ipadapter_wrapper.py * rename sdxl_support.pt, move SDXLExportWrapper * move export wrappers to directory * move models * rename engine.py * move engines to directory * fix straggle imports * move preprocessors from src/streamdiffusion/controlnet/ --> src/streamdiffusion * move engine pool from runtime folder * install and use diffusers_ipadapter package * remove legacy docs * set use cuda graph true in wrapper * Ryan/fix/01 fix perf regression (cumulo-autumn#46) * remove logging, input/output validation * remove logging, inputoutput from infer() * remove logging and input output validation from unet * remove overhead from hotpath remove logging, input/output validation, make vram montioring in debug mode only * remove logging from controlnet engine * remove logger.debug * remove HybridControlnet abstraction and pytorch fallback * remove dead code * add feedback preprocessor * add feedback preprocessor support * add blend to preprocessor * add preprocessor metadata * dynamic preprocessor controls * remove erroneous variable * unify tensorrt engine management * remove unicode chars * import fix * change default acceleration * fullscreen * add route to get default image and makes ipadapter use it * rgb conversion fix * static video input control * minimalist resolution picker * increase max delta value * Update resolution button --------- Co-authored-by: Victor Elias <victor@livepeer.org> Co-authored-by: Victor Elias <victorgelias@gmail.com> Co-authored-by: Buff <marcotundo@gmail.com> Co-authored-by: BuffMcBigHuge <marco@bymar.co>
1 parent e62007a commit 4961437

113 files changed

Lines changed: 21235 additions & 3385 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# https://github.com/github/gitignore/blob/main/Python.gitignore
2+
notes/
23

34
.vscode/
45
engines/
@@ -206,3 +207,11 @@ __pycache__/
206207

207208
models/RealESR*
208209
*.safetensors
210+
*.onnx
211+
212+
# Ignore user config files
213+
configs/*.yaml
214+
configs/*.yml
215+
216+
images/outputs/*
217+
images/inputs/*
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# StreamDiffusion Preprocessor Reference
2+
# Copy and modify the sections you need for your configuration
3+
4+
# =============================================================================
5+
# PREPROCESSOR INTERFACES
6+
# =============================================================================
7+
8+
# Basic Preprocessors
9+
# ---------------------------------------------------
10+
11+
# Canny Edge Detection
12+
preprocessor: "canny"
13+
preprocessor_params:
14+
low_threshold: 100 # int, 0-255, lower values detect more edges
15+
high_threshold: 200 # int, 0-255, should be 2-3x higher than low_threshold
16+
17+
# Passthrough (no processing - for tile/reference ControlNets)
18+
preprocessor: "passthrough"
19+
preprocessor_params:
20+
image_resolution: 512 # int, 256-1024, output resolution
21+
22+
# CPU Depth Estimation (requires transformers)
23+
preprocessor: "depth"
24+
preprocessor_params:
25+
model_name: "Intel/dpt-large" # str, HuggingFace model name
26+
detect_resolution: 512 # int, resolution for detection
27+
image_resolution: 512 # int, final output resolution
28+
29+
# CPU Pose Detection (requires controlnet_aux or fallback)
30+
preprocessor: "openpose"
31+
preprocessor_params:
32+
detect_resolution: 512 # int, resolution for detection
33+
image_resolution: 512 # int, final output resolution
34+
include_hands: false # bool, include hand keypoints
35+
include_face: false # bool, include face keypoints
36+
37+
# Line Art Detection (requires controlnet_aux)
38+
preprocessor: "lineart"
39+
preprocessor_params:
40+
detect_resolution: 512 # int, resolution for detection
41+
image_resolution: 512 # int, final output resolution
42+
coarse: true # bool, use coarse line art detection
43+
anime_style: false # bool, use anime-style line art
44+
45+
# Standard Line Art (traditional computer vision)
46+
preprocessor: "standard_lineart"
47+
preprocessor_params:
48+
detect_resolution: 512 # int, resolution for detection
49+
image_resolution: 512 # int, final output resolution
50+
gaussian_sigma: 6.0 # float, Gaussian blur sigma
51+
intensity_threshold: 8 # int, intensity calculation threshold
52+
53+
# Soft Edge Detection (real-time optimized)
54+
preprocessor: "soft_edge"
55+
preprocessor_params:
56+
image_resolution: 512 # int, 256-1024, final output resolution (512 recommended for optimal performance)
57+
strength: 1.0 # float, 0.1-2.0, edge detection strength
58+
soft_threshold: 0.5 # float, 0.1-0.9, controls edge softness
59+
multi_scale: true # bool, use multi-scale edge detection for better quality
60+
gaussian_sigma: 1.0 # float, 0.5-3.0, pre-smoothing sigma
61+
62+
# Advanced Preprocessors (Require additional setup)
63+
# --------------------------------------------------
64+
65+
# TensorRT Depth Estimation (requires TensorRT engine)
66+
preprocessor: "depth_tensorrt"
67+
preprocessor_params:
68+
engine_path: "C:\\path\\to\\depth_anything_v2_vits-fp16.engine" # str, REQUIRED: absolute path to .engine file
69+
detect_resolution: 518 # int, 256-1024, must match engine input size
70+
image_resolution: 512 # int, 256-1024, final output resolution
71+
72+
# TensorRT Pose Detection (requires TensorRT engine)
73+
preprocessor: "pose_tensorrt"
74+
preprocessor_params:
75+
engine_path: "C:\\path\\to\\yolo_nas_pose_l_0.8-fp16.engine" # str, REQUIRED: absolute path to .engine file
76+
detect_resolution: 640 # int, 320-1024, must match engine input size
77+
image_resolution: 512 # int, 256-1024, final output resolution
78+
79+
# MediaPipe Pose Detection (requires mediapipe)
80+
preprocessor: "mediapipe_pose"
81+
preprocessor_params:
82+
detect_resolution: 512 # int, resolution for detection
83+
image_resolution: 512 # int, final output resolution
84+
min_detection_confidence: 0.5 # float, 0.0-1.0, minimum detection confidence
85+
min_tracking_confidence: 0.5 # float, 0.0-1.0, minimum tracking confidence
86+
model_complexity: 1 # int, 0-2, MediaPipe model complexity
87+
static_image_mode: true # bool, treat each image independently
88+
draw_hands: true # bool, draw hand poses
89+
draw_face: false # bool, draw face landmarks
90+
line_thickness: 2 # int, thickness of skeleton lines
91+
circle_radius: 4 # int, radius of joint circles
92+
confidence_threshold: 0.3 # float, 0.0-1.0, minimum confidence for rendering
93+
enable_smoothing: true # bool, enable temporal smoothing
94+
smoothing_factor: 0.7 # float, 0.0-1.0, smoothing strength
95+
96+
# =============================================================================
97+
# AVAILABLE CONTROLNET MODELS (include but are not limited to)
98+
# =============================================================================
99+
100+
# Stable Diffusion 1.5 Models
101+
sd15_models_include_but_not_limited_to:
102+
canny: "lllyasviel/control_v11p_sd15_canny"
103+
depth: "lllyasviel/control_v11f1p_sd15_depth"
104+
openpose: "lllyasviel/control_v11p_sd15_openpose"
105+
lineart: "lllyasviel/control_v11p_sd15_lineart"
106+
tile: "lllyasviel/control_v11f1e_sd15_tile"
107+
scribble: "lllyasviel/control_v11p_sd15_scribble"
108+
seg: "lllyasviel/control_v11p_sd15_seg"
109+
normal: "lllyasviel/control_v11p_sd15_normalbae"
110+
mlsd: "lllyasviel/control_v11p_sd15_mlsd"
111+
hed: "lllyasviel/control_v11p_sd15_hed" # Compatible with soft_edge preprocessor
112+
113+
# Stable Diffusion 2.1 Models
114+
sd21_models_include_but_not_limited_to:
115+
canny: "thibaud/controlnet-sd21-canny-diffusers"
116+
depth: "thibaud/controlnet-sd21-depth-diffusers"
117+
openpose: "thibaud/controlnet-sd21-openpose-diffusers"
118+
lineart: "thibaud/controlnet-sd21-lineart-diffusers"
119+
scribble: "thibaud/controlnet-sd21-scribble-diffusers"
120+
hed: "thibaud/controlnet-sd21-hed-diffusers"
121+
zoedepth: "thibaud/controlnet-sd21-zoedepth-diffusers"
122+
123+
# SDXL Models
124+
sdxl_models_include_but_not_limited_to:
125+
canny: "diffusers/controlnet-canny-sdxl-1.0"
126+
depth: "diffusers/controlnet-depth-sdxl-1.0"
127+
openpose: "thibaud/controlnet-openpose-sdxl-1.0"
128+
# Note: soft_edge preprocessor compatible with HED-based ControlNet models
129+
130+
# Note: Many more ControlNet models exist on HuggingFace Hub.
131+
# Search for "controlnet" to find additional models for your specific needs.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# StreamDiffusion Configuration for Prompt & Seed Blending Demo
2+
# Simple img2img setup without ControlNets for demonstrating prompt and seed blending
3+
4+
model_id: "KBlueLeaf/kohaku-v2.1"
5+
t_index_list: [16, 32]
6+
width: 512
7+
height: 512
8+
device: "cuda"
9+
dtype: "float16"
10+
mode: img2img
11+
12+
# Generation parameters (base - will be overridden by blending)
13+
prompt: "a waifu girl cute"
14+
negative_prompt: "blurry, low quality, ugly"
15+
guidance_scale: 1.2
16+
num_inference_steps: 50
17+
18+
# StreamDiffusion parameters
19+
use_denoising_batch: true
20+
delta: 0.7
21+
frame_buffer_size: 1
22+
23+
# Pipeline configuration
24+
pipeline_type: "sd1.5"
25+
use_lcm_lora: true
26+
use_tiny_vae: true
27+
acceleration: "xformers" # Use xformers instead of tensorrt for easier setup
28+
cfg_type: "self"
29+
seed: 42
30+
31+
# Warmup iterations for performance
32+
warmup: 5
33+
34+
# Prompt blending configuration
35+
# This will override the single 'prompt' above
36+
# prompt_blending:
37+
# prompt_list:
38+
# - ["a waifu girl cute", 1.0]
39+
# - ["a demon from hell", 0.0]
40+
# interpolation_method: "slerp" # or "linear"
41+
# enable_caching: true
42+
43+
# Seed blending configuration
44+
# This enables blending between different noise patterns
45+
# for added visual variety alongside prompt blending
46+
seed_blending:
47+
seed_list:
48+
- [42, 1.0] # Stable, controlled generation
49+
- [999, 0.0] # More chaotic, varied generation
50+
interpolation_method: "linear" # or "slerp"
51+
enable_caching: true
52+
53+
# No ControlNets for this demo
54+
# controlnets: []
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
model_id: "stabilityai/sd-turbo"
2+
t_index_list: [0,16]
3+
width: 512
4+
height: 512
5+
device: "cuda"
6+
dtype: "float16"
7+
8+
# Generation parameters
9+
prompt: "an anime render of a girl with purple hair, masterpiece"
10+
negative_prompt: "blurry, low quality, flat, 2d"
11+
guidance_scale: 1.1
12+
num_inference_steps: 50
13+
14+
# Temporal consistency parameters
15+
frame_buffer_size: 1
16+
delta: 0.7
17+
18+
# Advanced parameters
19+
use_lcm_lora: false
20+
use_tiny_vae: true
21+
acceleration: "tensorrt"
22+
cfg_type: "self"
23+
seed: 789
24+
25+
# ControlNet configuration with TensorRT Depth Anything
26+
controlnets:
27+
- model_id: "thibaud/controlnet-sd21-depth-diffusers"
28+
conditioning_scale: 0.5
29+
preprocessor: "depth_tensorrt"
30+
preprocessor_params:
31+
engine_path: "C:\\_dev\\comfy\\ComfyUI\\models\\tensorrt\\depth-anything\\depth_anything_vits14-fp16.engine"
32+
detect_resolution: 518
33+
image_resolution: 512
34+
enabled: true
35+
36+
- model_id: "thibaud/controlnet-sd21-canny-diffusers"
37+
conditioning_scale: 0.5
38+
preprocessor: "canny"
39+
preprocessor_params:
40+
low_threshold: 50
41+
high_threshold: 100
42+
control_image_path: null
43+
enabled: true
44+
control_guidance_start: 0.0
45+
control_guidance_end: 1.0
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
model_id: "KBlueLeaf/kohaku-v2.1"
2+
t_index_list: [16, 32]
3+
width: 512
4+
height: 512
5+
device: "cuda"
6+
dtype: "float16"
7+
8+
# Generation parameters
9+
prompt: "an anime render of a girl with purple hair, masterpiece"
10+
negative_prompt: "blurry, low quality, flat, 2d"
11+
guidance_scale: 1.1
12+
num_inference_steps: 50
13+
14+
use_denoising_batch: true
15+
delta: 0.7
16+
frame_buffer_size: 1
17+
18+
# Advanced parameters
19+
use_lcm_lora: true
20+
use_tiny_vae: true
21+
acceleration: "xformers"
22+
cfg_type: "self"
23+
seed: 789
24+
25+
# ControlNet configuration with TensorRT Depth Anything
26+
controlnets:
27+
- model_id: "lllyasviel/control_v11f1p_sd15_depth"
28+
conditioning_scale: 0.28
29+
preprocessor: "depth_tensorrt"
30+
preprocessor_params:
31+
engine_path: "C:\\_dev\\comfy\\ComfyUI\\models\\tensorrt\\depth-anything\\v2_depth_anything_v2_vits-fp16.engine"
32+
detect_resolution: 518
33+
image_resolution: 512
34+
enabled: true
35+
36+
- model_id: "lllyasviel/control_v11p_sd15_canny"
37+
conditioning_scale: 0.29
38+
preprocessor: "canny"
39+
preprocessor_params:
40+
low_threshold: 100
41+
high_threshold: 200
42+
enabled: true

configs/sd15_tile.yaml.example

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
model_id: "KBlueLeaf/kohaku-v2.1"
2+
t_index_list: [0,16]
3+
width: 512
4+
height: 512
5+
device: "cuda"
6+
dtype: "float16"
7+
8+
# Generation parameters
9+
prompt: "masterpiece, high quality, detailed"
10+
negative_prompt: "blurry, low quality, distorted"
11+
guidance_scale: 1.1
12+
num_inference_steps: 50
13+
14+
# Advanced parameters
15+
use_lcm_lora: true
16+
use_tiny_vae: true
17+
acceleration: "xformers"
18+
cfg_type: "self"
19+
seed: 456
20+
21+
# ControlNet configuration with Tile ControlNet
22+
controlnets:
23+
- model_id: "lllyasviel/control_v11f1e_sd15_tile"
24+
conditioning_scale: 0.2
25+
preprocessor: "passthrough"
26+
preprocessor_params:
27+
image_resolution: 512
28+
enabled: true

configs/sdturbo_color.yaml.example

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
model_id: "stabilityai/sd-turbo"
2+
t_index_list: [0,16]
3+
width: 512
4+
height: 512
5+
device: "cuda"
6+
dtype: "float16"
7+
8+
# Generation parameters
9+
prompt: "an anime render of a girl with purple hair, masterpiece"
10+
negative_prompt: "blurry, low quality, flat, 2d"
11+
guidance_scale: 1.1
12+
num_inference_steps: 50
13+
14+
# Temporal consistency parameters
15+
frame_buffer_size: 1
16+
use_denoising_batch: true
17+
delta: 0.7
18+
19+
# Advanced parameters
20+
use_lcm_lora: true
21+
use_tiny_vae: true
22+
acceleration: "tensorrt"
23+
cfg_type: "self"
24+
seed: 789
25+
26+
# ControlNet configuration with TensorRT Depth Anything
27+
controlnets:
28+
- model_id: "thibaud/controlnet-sd21-color-diffusers"
29+
conditioning_scale: 0.2
30+
preprocessor: "passthrough"
31+
preprocessor_params:
32+
image_resolution: 512
33+
enabled: true

0 commit comments

Comments
 (0)