[Feat] support JoyAIImagePipeline #13437
[Feat] support JoyAIImagePipeline #13437RuixiangMa wants to merge 6 commits intohuggingface:mainfrom
Conversation
Signed-off-by: Lancer <maruixiang6688@gmail.com>
yiyixuxu
left a comment
There was a problem hiding this comment.
thanks for the PR, i left some initial comments
| from .autoencoder_kl_wan import ( | ||
| WanAttentionBlock as AttentionBlock, | ||
| ) | ||
| from .autoencoder_kl_wan import ( |
There was a problem hiding this comment.
can you not import from wan? let's use #Copied from isntead
There was a problem hiding this comment.
I will remove the direct imports from Wan and inlined the reused helper blocks in JoyAI with # Copied from comments instead.
| self._joyai_force_vae_fp32 = True | ||
|
|
||
| @classmethod | ||
| def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): |
There was a problem hiding this comment.
what's going on here? is there any reason we cannot make eit work with DiffusionPipeline.from_pretrained?
There was a problem hiding this comment.
The upstream JoyAI checkpoint is not a standard diffusers repo layout, so it cannot be loaded by DiffusionPipeline.from_pretrained directly.
I agree the better long-term solution is to add a one-time conversion/export to a standard diffusers checkpoint and then rely on the base from_pretrained path for the exported directory
| prev_sample: torch.FloatTensor | ||
|
|
||
|
|
||
| class JoyAIFlowMatchDiscreteScheduler(SchedulerMixin, ConfigMixin): |
There was a problem hiding this comment.
@claude
can you tell me what's the difference between this and FlowMatchDiscreteSchedule?
There was a problem hiding this comment.
I double-checked this. It is close to FlowMatchEulerDiscreteScheduler, but not numerically identical as-is because JoyAI uses its own timestep/sigma shifting behavior.
I will refactorit to subclass FlowMatchEulerDiscreteScheduler and only keep the JoyAI-specific differences in the scheduler implementation.
|
@yiyixuxu Thanks for the comments! PTAL |
Support JoyAIImagePipeline
https://github.com/jd-opensource/JoyAI-Image
jdopensource/JoyAI-Image-Edit
add hat in the dogRotate the dog to show the left side viewRotate the dog to show the right side viewBefore submitting
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.