Skip to content

feat(image): add FireRed Image Edit 1.1 support - #5306

Open
Minamiyama wants to merge 3 commits into
xorbitsai:mainfrom
Minamiyama:models/firered-image-edit-1_1
Open

feat(image): add FireRed Image Edit 1.1 support#5306
Minamiyama wants to merge 3 commits into
xorbitsai:mainfrom
Minamiyama:models/firered-image-edit-1_1

Conversation

@Minamiyama

Copy link
Copy Markdown
Collaborator

No description provided.

@XprobeBot XprobeBot added this to the v3.x milestone Aug 11, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds support for the "FireRed-Image-Edit-1.1" model by defining its specification and updating the stable diffusion core to load it via the DiffusionPipeline. It also updates the image_to_image method to apply default generation configurations and combine reference_images for QwenImageEditPlusPipeline. Feedback suggests addressing potential runtime errors: safely handling cases where self._model_spec is None to avoid an AttributeError, and ensuring reference_images is wrapped in a list if it is not already iterable to prevent a TypeError.

Comment on lines +943 to +947
generate_kwargs = ( # type: ignore
self._model_spec.default_generate_config or {}
).copy()
generate_kwargs.update({k: v for k, v in kwargs.items() if v is not None})
kwargs = generate_kwargs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The self._model_spec attribute is defined as Optional and can be None. Accessing self._model_spec.default_generate_config directly without a None check can lead to an AttributeError if the model is initialized without a spec. We should safely handle the case where self._model_spec is None.

        default_config = (
            self._model_spec.default_generate_config
            if self._model_spec is not None
            else None
        ) or {}
        generate_kwargs = default_config.copy()
        generate_kwargs.update({k: v for k, v in kwargs.items() if v is not None})
        kwargs = generate_kwargs

Comment thread xinference/model/image/stable_diffusion/core.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants