Skip to content

Update pipeline#56

Merged
suzukimain merged 15 commits intomasterfrom
update-pipeline
Jan 12, 2026
Merged

Update pipeline#56
suzukimain merged 15 commits intomasterfrom
update-pipeline

Conversation

@suzukimain
Copy link
Copy Markdown
Owner

This pull request updates the README.md to inform users about known issues with the Civitai API due to recent specification changes. It explains the impact on search functionality and provides a link to the relevant issue for further details.

Documentation update:

  • Added a new section describing the current issues with the Civitai API, including reduced search accuracy and missing search results, and noted that a temporary workaround has been implemented. Also included a link to the upstream issue for reference.

Copilot AI review requested due to automatic review settings January 12, 2026 08:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request's title and description indicate it's a documentation update about Civitai API issues, but it actually contains substantial code changes to the pipeline system. The PR includes both README documentation updates about Civitai API bugs and extensive modifications to pipeline_easy.py including import reorganization, addition of ~50 new pipeline types, a new security feature for file format filtering, and multiple changes to pipeline mappings.

Changes:

  • Added documentation in README.md about known Civitai API issues and workarounds
  • Reorganized imports in pipeline_easy.py with better categorization and try-except blocks for optional pipelines
  • Added support for numerous new pipeline types (Flux variants, Qwen, Kandinsky, Lumina, Sana, Wan, ZImage, etc.)
  • Introduced allow_unsafe_formats security parameter to control whether .ckpt and .bin files are allowed (defaults to safetensors-only)
  • Updated pipeline mappings for text2image, image2image, and inpainting tasks with new model type support
  • Added new video pipeline mappings (text2video, image2video, video2video)
  • Fixed error message from "for_hf" to "from_huggingface"

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 12 comments.

File Description
README.md Added documentation section about Civitai API specification changes causing search accuracy issues and missing results
src/auto_diffusers/pipeline_easy.py Major refactoring: reorganized imports, added ~50 new pipeline types with optional import handling, introduced security filtering for file formats, updated pipeline mappings for various tasks, added video pipeline support

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread README.md
- Some search results not being returned
A temporary workaround has been implemented for the above issues, but since certain search results are still not returned, there is a possibility that some models may not be found.

link: [civitai/civitai#1757](https://github.com/civitai/civitai/issues/1757)
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The colon after "link" is a full-width character (:) instead of a regular colon (:). This should use the standard ASCII colon for consistency.

Suggested change
link [civitai/civitai#1757](https://github.com/civitai/civitai/issues/1757)
link: [civitai/civitai#1757](https://github.com/civitai/civitai/issues/1757)

Copilot uses AI. Check for mistakes.
Comment thread src/auto_diffusers/pipeline_easy.py Outdated
Comment thread src/auto_diffusers/pipeline_easy.py Outdated
Comment on lines +548 to +563
def get_allowed_extensions(allow_unsafe_formats: bool = False) -> List[str]:
r"""
Get the list of allowed file extensions based on safety preferences.

Parameters:
allow_unsafe_formats (`bool`, *optional*, defaults to `False`):
If True, allows potentially unsafe formats (.ckpt, .bin) in addition to .safetensors.
If False (default), only allows .safetensors format for maximum security.

Returns:
`List[str]`: List of allowed file extensions.
"""
if allow_unsafe_formats:
return [".safetensors", ".ckpt", ".bin"]
else:
return [".safetensors"]
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing documentation for the new allow_unsafe_formats parameter in the module-level docstring or user guide. This is a security-relevant parameter that changes the default behavior, and users should be clearly informed about:

  • What makes .ckpt and .bin formats "unsafe" (pickle deserialization risks)
  • The security implications of enabling this option
  • When it might be necessary to use this option
  • Best practices for using this parameter safely

Copilot uses AI. Check for mistakes.
Comment on lines 228 to 311
("animatediff_v1", AnimateDiffPipeline),
("animatediff_v2", AnimateDiffPipeline),
("animatediff_v3", AnimateDiffPipeline),
("auraflow", AuraFlowPipeline),
("autoencoder-dc-f128c512", None),
("autoencoder-dc-f32c32", None),
("autoencoder-dc-f32c32-sana", None),
("autoencoder-dc-f64c128", None),
("chroma", ChromaPipeline),
("cogview3", CogView3PlusPipeline),
("cogview4", CogView4Pipeline),
("cogview4-control", CogView4ControlPipeline),
("controlnet", StableDiffusionControlNetPipeline),
("controlnet_xl", StableDiffusionXLControlNetPipeline),
("controlnet_xl_large", StableDiffusionXLControlNetPipeline),
("controlnet_xl_mid", StableDiffusionXLControlNetPipeline),
("controlnet_xl_small", StableDiffusionXLControlNetPipeline),
("controlnet_xl_union", StableDiffusionXLControlNetUnionPipeline),
("cosmos-1.0-t2w-7B", None),
("cosmos-1.0-t2w-14B", None),
("cosmos-1.0-v2w-7B", None),
("cosmos-1.0-v2w-14B", None),
("cosmos-2.0-t2i-2B", None),
("cosmos-2.0-t2i-14B", None),
("cosmos-2.0-v2w-2B", None),
("cosmos-2.0-v2w-14B", None),
("flux-2-dev", FluxPipeline),
("flux-control", FluxControlPipeline),
("flux-controlnet", FluxControlNetPipeline),
("flux-depth", FluxPipeline),
("flux-dev", FluxPipeline),
("flux-fill", FluxPipeline),
("flux-kontext", FluxKontextPipeline),
("flux-schnell", FluxPipeline),
("hidream", None),
("hunyuan", HunyuanDiTPipeline),
("hunyuan-video", None),
("inpainting", None),
("inpainting_v2", None),
("inpainting", StableDiffusionInpaintPipeline),
("inpainting_v2", StableDiffusionInpaintPipeline),
("instruct-pix2pix", None),
("kandinsky", KandinskyCombinedPipeline),
("kandinsky22", KandinskyV22CombinedPipeline),
("kandinsky3", Kandinsky3Pipeline),
("lcm", LatentConsistencyModelPipeline),
("lumina", LuminaPipeline),
("lumina2", Lumina2Pipeline),
("ltx-video", None),
("ltx-video-0.9.1", None),
("ltx-video-0.9.5", None),
("ltx-video-0.9.7", None),
("mochi-1-preview", None),
("ovis", OvisImagePipeline),
("pixart-alpha", PixArtAlphaPipeline),
("pixart-sigma", PixArtSigmaPipeline),
("playground-v2-5", StableDiffusionXLPipeline),
("qwenimage", QwenImagePipeline),
("qwenimage-controlnet", QwenImageControlNetPipeline),
("sana", SanaPipeline),
("sd3", StableDiffusion3Pipeline),
("sd35_large", StableDiffusion3Pipeline),
("sd35_medium", StableDiffusion3Pipeline),
("sd3-controlnet", StableDiffusion3ControlNetPipeline),
("stable_cascade_stage_b", None),
("stable_cascade_stage_b_lite", None),
("stable_cascade_stage_c", None),
("stable_cascade_stage_c_lite", None),
("upscale", StableDiffusionUpscalePipeline),
("v1", StableDiffusionPipeline),
("v2", StableDiffusionPipeline),
("wan-i2v-14B", WanImageToVideoPipeline),
("wan-t2v-1.3B", WanPipeline),
("wan-t2v-14B", WanPipeline),
("wan-vace-1.3B", WanVideoToVideoPipeline),
("wan-vace-14B", WanVideoToVideoPipeline),
("xl_base", StableDiffusionXLPipeline),
("xl_inpaint", None),
("xl_refiner", StableDiffusionXLPipeline),
("z-image", ZImagePipeline),
("z-image-controlnet", ZImageControlNetPipeline),
("z-image-omni", ZImageOmniPipeline),
("z-image-turbo", None),
("z-image-turbo-controlnet", None),
("z-image-turbo-controlnet-2.0", None),
("z-image-turbo-controlnet-2.1", None),
],
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removed entries for "xl_inpaint" in the text2image and image2image mappings (previously set to None) appear to be intentionally removed, but this entry is still present in the inpainting mapping at line 469 with a valid pipeline. This inconsistency could indicate that "xl_inpaint" was previously explicitly marked as unsupported for text2image and image2image tasks. The removal of these explicit None entries might cause the code to attempt to use a default or fallback behavior rather than explicitly indicating that these combinations are unsupported. Consider whether these None entries should be restored for clarity, or if the removal is intentional and the code handles missing entries appropriately.

Copilot uses AI. Check for mistakes.
Comment thread src/auto_diffusers/pipeline_easy.py Outdated
Comment thread src/auto_diffusers/pipeline_easy.py Outdated
Comment on lines +548 to +563
def get_allowed_extensions(allow_unsafe_formats: bool = False) -> List[str]:
r"""
Get the list of allowed file extensions based on safety preferences.

Parameters:
allow_unsafe_formats (`bool`, *optional*, defaults to `False`):
If True, allows potentially unsafe formats (.ckpt, .bin) in addition to .safetensors.
If False (default), only allows .safetensors format for maximum security.

Returns:
`List[str]`: List of allowed file extensions.
"""
if allow_unsafe_formats:
return [".safetensors", ".ckpt", ".bin"]
else:
return [".safetensors"]
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The get_allowed_extensions function introduces a breaking change in default behavior. By default, when allow_unsafe_formats is False, only .safetensors files will be allowed. However, the global EXTENSION constant still includes all formats for backward compatibility. This creates confusion and potential runtime issues where existing code might fail to find models that use .ckpt or .bin formats unless users explicitly pass allow_unsafe_formats=True. Consider:

  1. Setting the default to True to maintain backward compatibility, or
  2. Adding a deprecation warning when unsafe formats are used, or
  3. Documenting this breaking change prominently in release notes and migration guides.

Copilot uses AI. Check for mistakes.
Comment thread src/auto_diffusers/pipeline_easy.py Outdated
StableDiffusion3Pipeline,
)

# Flux pipelines (import separately to avoid Flax deprecation warnings)
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment states that Flux pipelines are imported separately "to avoid Flax deprecation warnings". However, this rationale is unclear - the Flux pipelines in the diffusers library are for PyTorch, not Flax. If there's a specific issue causing deprecation warnings when importing Flux pipelines, it should be documented more clearly or reported upstream. The try-except import pattern is good practice for optional dependencies, but the justification should be accurate.

Suggested change
# Flux pipelines (import separately to avoid Flax deprecation warnings)
# Flux pipelines (optional: may not be available in all diffusers installations)

Copilot uses AI. Check for mistakes.
Comment on lines +112 to +162
from diffusers import (
AuraFlowPipeline,
ChromaPipeline,
CogView3PlusPipeline,
CogView4ControlPipeline,
CogView4Pipeline,
HunyuanDiTPipeline,
KandinskyCombinedPipeline,
KandinskyImg2ImgCombinedPipeline,
KandinskyImg2ImgPipeline,
KandinskyInpaintCombinedPipeline,
KandinskyInpaintPipeline,
KandinskyPipeline,
KandinskyV22CombinedPipeline,
KandinskyV22Img2ImgCombinedPipeline,
KandinskyV22Img2ImgPipeline,
KandinskyV22InpaintCombinedPipeline,
KandinskyV22InpaintPipeline,
KandinskyV22Pipeline,
Kandinsky3Img2ImgPipeline,
Kandinsky3Pipeline,
LatentConsistencyModelImg2ImgPipeline,
LatentConsistencyModelPipeline,
Lumina2Pipeline,
LuminaPipeline,
OvisImagePipeline,
PixArtAlphaPipeline,
PixArtSigmaPipeline,
QwenImageControlNetPipeline,
QwenImageEditInpaintPipeline,
QwenImageEditPipeline,
QwenImageEditPlusPipeline,
QwenImageImg2ImgPipeline,
QwenImageInpaintPipeline,
QwenImageLayeredPipeline,
QwenImagePipeline,
SanaPipeline,
StableDiffusion3ControlNetInpaintingPipeline,
StableDiffusion3ControlNetPipeline,
StableDiffusionXLControlNetUnionImg2ImgPipeline,
StableDiffusionXLControlNetUnionInpaintPipeline,
StableDiffusionXLControlNetUnionPipeline,
WanImageToVideoPipeline,
WanPipeline,
WanVideoToVideoPipeline,
ZImageControlNetInpaintPipeline,
ZImageControlNetPipeline,
ZImageImg2ImgPipeline,
ZImageOmniPipeline,
ZImagePipeline,
)
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import of 'KandinskyImg2ImgPipeline' is not used.
Import of 'KandinskyInpaintPipeline' is not used.
Import of 'KandinskyPipeline' is not used.
Import of 'KandinskyV22Img2ImgPipeline' is not used.
Import of 'KandinskyV22InpaintPipeline' is not used.
Import of 'KandinskyV22Pipeline' is not used.

Copilot uses AI. Check for mistakes.
@suzukimain suzukimain merged commit c3e0ae7 into master Jan 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants