RegionalPrompting: Inherit from Stable Diffusion#11525
Merged
Merged
Conversation
…tead of Stable Diffusion Pipeline
Member
|
Hi @b-sai, thanks for the PR, can you please post an example with the images to ensure that this works? With this I mean to make sure that each region uses the corresponding prompt, it can be an easy one like a some geometrical figures with colors. |
Contributor
Author
|
Hi @asomoza thanks so much for looking at this! Here I have attached two images. Current Pull RequestOriginalCode: rp_args = {
"mode":"rows",
"div": "1,2,1,1;2,4,6"
}
prompt = """
blue sky BREAK
green hair BREAK
book shelf BREAK
terrarium on the desk BREAK
orange dress and sofa
"""
pipe = RegionalPromptingStableDiffusionPipeline.from_pretrained("ckpt/anything-v3.0", safety_checker = None, requires_safty_checker = None)
pipe.to("cuda")
images = pipe(
prompt=prompt,
guidance_scale=7.5,
height=512,
width=768,
num_inference_steps=20,
num_images_per_prompt=1,
rp_args=rp_args
).images |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Member
|
@bot /style |
Contributor
|
Style fixes have been applied. View the workflow run here. |
asomoza
approved these changes
May 20, 2025
Member
|
thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What does this PR do?
This pull request refactors the
RegionalPromptingStableDiffusionPipelineclass to inherit from theDiffusionPipelineclass rather than theStableDiffusionPipelineclassI tested it on the examples here and it is replicating similar images
Fixes issue #6984
Before submitting
StableDiffusionPipeline#6984documentation guidelines, and
here are tips on formatting docstrings.
cc: @yiyixuxu