Closed rob-hen closed 1 week ago
How can we use negative prompts with the framework?
I thought to replace this line https://github.com/hpcaitech/Open-Sora/blob/0312a0d85290eeb5c04f122c3688baaa0f8d9c8c/opensora/schedulers/iddpm/__init__.py#L69 with this line:
if use_negative_prompts: model_args_negative = text_encoder.encode(negative_prompts) y_null = model_args_negative["y"] else: y_null = text_encoder.null(n)
However, the result looks wrong. Do you have any idea how it can be integrated?
Its now working, we also have to update the mask:
model_args["mask"] = torch.cat([model_args["mask"], model_args_negative["mask"]],dim=0)
@zhengzangw May be you want to add it to your code as well.
How can we use negative prompts with the framework?
I thought to replace this line https://github.com/hpcaitech/Open-Sora/blob/0312a0d85290eeb5c04f122c3688baaa0f8d9c8c/opensora/schedulers/iddpm/__init__.py#L69 with this line:
However, the result looks wrong. Do you have any idea how it can be integrated?