8000 [Subject-Driven Generation] White right margin using subject_1024_beta model · Issue #133 · Yuanshi9815/OminiControl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[Subject-Driven Generation] White right margin using subject_1024_beta model #133
Open
@julienlambert706

Description

@julienlambert706

Hello,

When generating a subject-driven image using subject_1024_beta model, I always get a white band at the right side of the image.

Here are additionnal observations :

  • The background of the reference image doesn't change band color
  • The band width change depending on prompt
  • The problem occurs with quantized and unquantized flux models

Here is the code to reproduce it :
`import torch
from diffusers.pipelines import FluxPipeline
from PIL import Image

from omini.pipeline.flux_omini import Condition, generate, seed_everything

pipe = FluxPipeline.from_pretrained(
"black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16
)
pipe = pipe.to("cuda")
pipe.load_lora_weights(
"Yuanshi/OminiControl",
weight_name=f"omini/subject_1024_beta.safetensors",
adapter_name="subject",
)

image = Image.open("assets/bg_centered.png").convert("RGB").resize((512, 512))

condition = Condition(image, "subject", position_delta=(0, -32))

prompt = "A film style shot. This item sits on the grass, with a big firecamp in the background."

seed_everything(42)
print("Generating...")
result_img = generate(
pipe,
prompt=prompt,
conditions=[condition],
num_inference_steps=8,
height=1024,
width=1024,
).images[0]

print("generated, saving...")

result_img.save("test.png", format="PNG")
`

Has anyone also encountered this issue ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0