Skip to content

Conversation

@AMEERAZAM08
Copy link
Contributor

@AMEERAZAM08 AMEERAZAM08 commented May 28, 2025

What does this PR do?

Fixes # (issue)

Before submitting

Who can review?

@sayakpaul ,@yiyixuxu and @asomoza

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.

@AMEERAZAM08
Copy link
Contributor Author

AMEERAZAM08 commented May 28, 2025

Hi @sayakpaul ,
Please take a look at this PR, thank you for your help :)

@sayakpaul sayakpaul requested a review from DN6 May 28, 2025 15:19
@AMEERAZAM08
Copy link
Contributor Author

AMEERAZAM08 commented May 30, 2025

@DN6 @a-r-r-o-w please review this PR ,
Thanks

@AMEERAZAM08
Copy link
Contributor Author

@sayakpaul Any other can review this

Copy link
Contributor

@a-r-r-o-w a-r-r-o-w left a comment

Choose a reason for hiding this comment

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

Hi, there is an excessive amount of unrelated changes that make this PR hard to review. Could you please rebase with main such that only the changes related to PhotoDoodle persist? You can follow some of the past PRs for an example on the expected changes: #10660, #11428, #10136

Additionally, I think if we tried shipping this in the community projects folder, we could review it faster

@AMEERAZAM08
Copy link
Contributor Author

AMEERAZAM08 commented Jun 2, 2025

I wanted to merge in diffuser
it can easily
import diffusers from PhotoDoodlePipeline
@a-r-r-o-w Now Updated .

@AMEERAZAM08
Copy link
Contributor Author

Hi @DN6 , @a-r-r-o-w change has been done

@AMEERAZAM08
Copy link
Contributor Author

@a-r-r-o-w can you review this we need it in diffusers pipeline
cc: @sayakpaul

@a-r-r-o-w a-r-r-o-w requested a review from yiyixuxu June 12, 2025 15:01
@a-r-r-o-w
Copy link
Contributor

@yiyixuxu Could you take a look here/test if you have the bandwidth?

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@github-actions github-actions bot added the stale Issues that haven't received updates label Jan 9, 2026
@yiyixuxu yiyixuxu removed the stale Issues that haven't received updates label Jan 9, 2026
@yiyixuxu
Copy link
Collaborator

yiyixuxu commented Jan 9, 2026

cc @dg845 can you take a look here?

@yiyixuxu yiyixuxu requested review from dg845 and removed request for a-r-r-o-w January 9, 2026 20:42
@dg845
Copy link
Collaborator

dg845 commented Jan 10, 2026

As far as I can tell, this pipeline is essentially identical to FluxKontextPipeline, as both accept a conditioning image argument which is encoded by the VAE to image_latents, packed, and concatenated with the packed latents in the patch sequence dimension (dim 1). The example from pipeline_photodoodle.py works quite well with FluxKontextPipeline:

import torch
from diffusers import FluxKontextPipeline
from diffusers.utils import load_image

pipe = FluxKontextPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
pipe = pipe.to("cuda")

pipe.load_lora_weights(
    "nicolaus-huang/PhotoDoodle", adapter_name="pretrain", weight_name="pretrain.safetensors"
)
pipe.load_lora_weights(
    "nicolaus-huang/PhotoDoodle", adapter_name="magiceffects", weight_name="sksmagiceffects.safetensors"
)
pipe.set_adapters(["pretrain", "magiceffects"], [1.0, 1.0])

image = load_image(
    "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/astronaut.jpg"
)
prompt = "add a halo and wings for the astronaut by sksmagiceffects"

output_image = pipe(
    image=image,
    prompt=prompt,
    height=image.height,
    width=image.width,
    num_inference_steps=28,
    guidance_scale=3.5,
    generator=torch.Generator().manual_seed(42),
).images[0]

output_image.save("photodoodle_results.png")
photodoodle_results

So I don't think there is a need to merge this PR.

@AMEERAZAM08
Copy link
Contributor Author

AMEERAZAM08 commented Jan 10, 2026

I agree that this is present now, but it was not there earlier.

@dg845
Alternatively, we can move the code sample to the community code section.
Please let me know if you would like me to create a pull request for this.

@AMEERAZAM08
Copy link
Contributor Author

@dg845 let me know

@AMEERAZAM08
Copy link
Contributor Author

added in community
@dg845
thanks

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.

4 participants