The vendored encode_prompt copies in the PAG, APG, ControlNet-XS and differential
diffusion pipelines dereference the .text_model wrapper that transformers 5.6
removed from CLIPTextModel, so their clip-skip path crashes on SD1.5 and SDXL TE1.
Apply the same getattr(te, 'text_model', te) fix as the core parser.
Mirrors upstream diffusers, which still carries this deref in pipeline
encode_prompt; only the single-file loader was fixed there.
The DWPose (Legacy) "Pose Model" (Tiny/Medium/Large) radio wrote to
config['DWPose (Legacy)']['model'], but the rtmlib backend
(RtmlibPoseDetector.from_pretrained) only takes the mode string and
always loads RTMPose 'lightweight' - it never reads that key (the only
config[...]['model'] readers are the SegmentAnything branch). The
selector was a no-op left over from the removed mmpose DWPose processor
(see #4956).
Remove the radio, its dead 'model' config key (both the module-level and
delay_load_config dicts), and its update_settings slot; reindex the
remaining settings 18..27. The settings list stays 1:1 with the UI
controls (re-derived the append-order -> update_settings map to confirm).
No runtime behavior change. The alternative - keep the capability by
mapping Tiny/Medium/Large onto rtmlib's mode - is intentionally not taken
here since it would change which model loads.
Co-Authored-By: Claude <noreply@anthropic.com>
update_settings() and the XYZ [Control] Processor axis still used
pre-rename names ('MediaPipe Face', 'DWPose', 'SegmentAnything') that
no longer exist as config keys after 8d4ebcd5e.
- update_settings(): update stale keys to 'MediaPipe Face (Legacy)',
'DWPose (Legacy)', 'SegmentAnything 1.0' -- the KeyError at
'MediaPipe Face' (line 182) was silently dropping all settings after
position 13 on every panel change
- DWPose (Legacy) config: add missing 'model' key so update_settings
can persist the Pose Model radio value without crashing
- processor.processors list: remove stale 'DWPose' entry (already
present as 'DWPose (Legacy)') that caused XYZ [Control] Processor
to offer an unloadable option
Fixes#4953
Co-Authored-By: Claude <noreply@anthropic.com>
The "processors multiple fixes" rename split 'SegmentAnything' / 'SAM 2.1'
into 'SegmentAnything 1.0' / 'SegmentAnything 2.1' but left Processor.load()
matching the old name by substring:
elif 'SegmentAnything' in processor_id:
... config['SegmentAnything']['model'] ...
Post-rename this (a) raises KeyError because 'SegmentAnything' is no longer
a config key, so both SAM processors fail to load, and (b) wrongly routes
'SegmentAnything 2.1' (a Sam2Detector loaded via load_config) into the
SAM-v1 weight path instead of letting it fall through to the generic
load_config branch.
Match the v1 id exactly and key off config[processor_id], restoring the
pre-rename routing: v1.0 -> explicit SAM-v1 branch, v2.1 -> load_config.
Co-Authored-By: Claude <noreply@anthropic.com>
api_list_models omitted the 'or model_type == all' clause for zimage, so ZImage ControlNets never appeared in the all listing - added it to match every other family. lite_model used pass for the unimplemented root==output branch, which fell through to b = getattr(b, attn_name) with b unbound or stale from a prior iteration (UnboundLocalError or wrong-block patch); use continue to skip it.
Co-Authored-By: Claude <noreply@anthropic.com>
The VideoCapture is stored in cap, but the per-frame read and skip/yield guards referenced video, which is set to None at function entry and never reassigned. As a result only the first frame of a video input was processed.
Co-Authored-By: Claude <noreply@anthropic.com>
When a video script (animatediff, text2video, image2video, stablevideodiffusion)
runs via Control tab, both the script's save and control_run's end-of-run save
fired. The latter crashed silently because the local `video` cv2 capture name at
control_run:584 shadowed the modules.video import, so the duplicate was hidden
and the gallery video link never propagated.
- alias import as video_module to bypass the shadow
- p.video_saved marker set by each script
- control_run skips its end-of-run save when the marker is set
Set p.video_interpolate at run() entry so process_images_inner picks up
the helper. Save calls keep their existing kwargs; the sentinel guard
skips re-interpolation when the helper already ran.
- animatediff, text2video, image2video, stablevideodiffusion route
mp4_interpolate into p.video_interpolate
- modules/control/run.py routes the request video_interpolate arg
- xyz_grid intentionally untouched: its end-of-axis save_video stitches
the cell slideshow, not per-cell videos; a future video_interpolate
axis would set p.video_interpolate per cell via axis_options