muzishen / IMAGDressing

👔IMAGDressing👔: Interactive Modular Apparel Generation for Virtual Dressing
Apache License 2.0
950 stars 81 forks source link

Prompt different scenes doesn't work. (Always get the white background as output) #32

Open baddth opened 1 month ago

baddth commented 1 month ago

Hi there,

We used inference_IMAGdressing.py with scene-related prompts, but the output was always a plain white background. We also couldn't change the gender of the result, unlike the example in the README.

Can you help us understand what we might be doing incorrectly?

We use the weight from IMAGDressing-v1_512.pt.

inference_IMAGdressing.py

    prompt = 'a man 'in the park'
    prompt = prompt + ', best quality, high quality'
    null_prompt = ''
    negative_prompt = 'bare, naked, nude, undressed, monochrome, lowres, bad anatomy, worst quality, low quality'

    print("BADDTH: ", prompt)

    clothes_img = Image.open(args.cloth_path).convert("RGB")
    clothes_img = resize_img(clothes_img)
    vae_clothes = img_transform(clothes_img).unsqueeze(0)
    ref_clip_image = clip_image_processor(images=clothes_img, return_tensors="pt").pixel_values

    output = pipe(
        ref_image=vae_clothes,
        prompt=prompt,
        ref_clip_image=ref_clip_image,
        null_prompt=null_prompt,
        negative_prompt=negative_prompt,
        width=512,
        height=640,
        num_images_per_prompt=num_samples,
        guidance_scale=7.5,
        image_scale=1.0,
        generator=generator,
        num_inference_steps=50,
    ).images

The output: (Cannot change scene and gender) 3

The example on README that we tried to get: different_scenes

Please keep doing the great work on the IMAGDressing! Your team rocks!

muzishen commented 2 weeks ago

The scale needs to be adjusted, similar to the webui.