mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-05-06 20:09:06 +08:00
Merge 32319e1c1afb25803b026b323c797a3d302e6f07 into 2174ce5afea90ca489d222f539988dcef59f1027
This commit is contained in:
commit
83e8423bc2
@ -763,6 +763,9 @@ def create_infotext(p, all_prompts, all_seeds, all_subseeds, comments=None, iter
|
|||||||
prompt_text = p.main_prompt if use_main_prompt else all_prompts[index]
|
prompt_text = p.main_prompt if use_main_prompt else all_prompts[index]
|
||||||
negative_prompt = p.main_negative_prompt if use_main_prompt else all_negative_prompts[index]
|
negative_prompt = p.main_negative_prompt if use_main_prompt else all_negative_prompts[index]
|
||||||
|
|
||||||
|
if any(x for x in [prompt_text, negative_prompt] if "(" in x or "[" in x):
|
||||||
|
p.extra_generation_params["Emphasis"] = opts.emphasis
|
||||||
|
|
||||||
uses_ensd = opts.eta_noise_seed_delta != 0
|
uses_ensd = opts.eta_noise_seed_delta != 0
|
||||||
if uses_ensd:
|
if uses_ensd:
|
||||||
uses_ensd = sd_samplers_common.is_sampler_using_eta_noise_seed_delta(p)
|
uses_ensd = sd_samplers_common.is_sampler_using_eta_noise_seed_delta(p)
|
||||||
|
@ -202,7 +202,7 @@ class TextConditionalModel(torch.nn.Module):
|
|||||||
Returns a tensor with shape of (B, T, C), where B is length of the array; T is length, in tokens, of texts (including padding) - T will
|
Returns a tensor with shape of (B, T, C), where B is length of the array; T is length, in tokens, of texts (including padding) - T will
|
||||||
be a multiple of 77; and C is dimensionality of each token - for SD1 it's 768, for SD2 it's 1024, and for SDXL it's 1280.
|
be a multiple of 77; and C is dimensionality of each token - for SD1 it's 768, for SD2 it's 1024, and for SDXL it's 1280.
|
||||||
An example shape returned by this function can be: (2, 77, 768).
|
An example shape returned by this function can be: (2, 77, 768).
|
||||||
For SDXL, instead of returning one tensor avobe, it returns a tuple with two: the other one with shape (B, 1280) with pooled values.
|
For SDXL, instead of returning one tensor above, it returns a tuple with two: the other one with shape (B, 1280) with pooled values.
|
||||||
Webui usually sends just one text at a time through this function - the only time when texts is an array with more than one element
|
Webui usually sends just one text at a time through this function - the only time when texts is an array with more than one element
|
||||||
is when you do prompt editing: "a picture of a [cat:dog:0.4] eating ice cream"
|
is when you do prompt editing: "a picture of a [cat:dog:0.4] eating ice cream"
|
||||||
"""
|
"""
|
||||||
@ -242,9 +242,6 @@ class TextConditionalModel(torch.nn.Module):
|
|||||||
hashes.append(self.hijack.extra_generation_params.get("TI hashes"))
|
hashes.append(self.hijack.extra_generation_params.get("TI hashes"))
|
||||||
self.hijack.extra_generation_params["TI hashes"] = ", ".join(hashes)
|
self.hijack.extra_generation_params["TI hashes"] = ", ".join(hashes)
|
||||||
|
|
||||||
if any(x for x in texts if "(" in x or "[" in x) and opts.emphasis != "Original":
|
|
||||||
self.hijack.extra_generation_params["Emphasis"] = opts.emphasis
|
|
||||||
|
|
||||||
if self.return_pooled:
|
if self.return_pooled:
|
||||||
return torch.hstack(zs), zs[0].pooled
|
return torch.hstack(zs), zs[0].pooled
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user