prompt-to-prompt
prompt-to-prompt copied to clipboard
Fix/typo
Fixed two critical typos in null_text_with_ptp.ipynb
1. 'x_t' was non existant on get_mask method :
class LocalBlend:
def get_mask(self, maps, alpha, use_pool):
k = 1
maps = (maps * alpha).sum(-1).mean(1)
if use_pool:
maps = nnf.max_pool2d(maps, (k * 2 + 1, k * 2 +1), (1, 1), padding=(k, k))
mask = nnf.interpolate(maps, size=(x_t.shape[2:])) # omits error
class LocalBlend:
def get_mask(self, maps, alpha, use_pool, x_t):
k = 1
maps = (maps * alpha).sum(-1).mean(1)
if use_pool:
maps = nnf.max_pool2d(maps, (k * 2 + 1, k * 2 +1), (1, 1), padding=(k, k))
mask = nnf.interpolate(maps, size=(x_t.shape[2:]))
2. Changed blend_word -> blend_words :
def make_controller(prompts: List[str], is_replace_controller: bool, cross_replace_steps: Dict[str, float], self_replace_steps: float, blend_words=None, equilizer_params=None) -> AttentionControlEdit:
if blend_words is None:
lb = None
else:
lb = LocalBlend(prompts, blend_word) # omits error
def make_controller(prompts: List[str], is_replace_controller: bool, cross_replace_steps: Dict[str, float], self_replace_steps: float, blend_words=None, equilizer_params=None) -> AttentionControlEdit:
if blend_words is None:
lb = None
else:
lb = LocalBlend(prompts, blend_words)
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.