Buckets:

download
raw
9.9 kB
import"../chunks/DsnmJJEf.js";import{i as E,h as I,C as J,H as r,a as P,D as s,E as w,s as U}from"../chunks/BtE7mKSK.js";import{p as k,o as j,s as e,f as z,a as g,b as Z,c as n,d as T,r as a,n as y}from"../chunks/jDjavuwI.js";const N='{"title":"JoyImageEditPlusTransformer3DModel","local":"joyimageeditplustransformer3dmodel","sections":[{"title":"JoyImageEditPlusTransformer3DModel","local":"diffusers.JoyImageEditPlusTransformer3DModel","sections":[],"depth":2},{"title":"Transformer2DModelOutput","local":"diffusers.models.modeling_outputs.Transformer2DModelOutput","sections":[],"depth":2}],"depth":1}';var W=T('<meta name="hf:doc:metadata"/>'),B=T(`<p></p> <!> <!> <p>The model can be loaded with the following code snippet.</p> <!> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>JoyImage Edit Plus Transformer for multi-image editing.</p> <p>Uses a patchify+padding approach where each reference image and the target noise are independently patchified and
concatenated into a flat patch sequence. Supports variable-resolution reference images.</p> <p>Input format: <code>[B, max_patches, C, pt, ph, pw]</code> (6D padded patches).</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>The output of <a href="/docs/diffusers/pr_13966/en/api/models/transformer2d#diffusers.Transformer2DModel">Transformer2DModel</a>.</p></div> <!> <p></p>`,1);function R(M,v){k(v,!1),j(()=>{new URLSearchParams(window.location.search).get("fw")}),E();var d=B();I("1yrlzrq",h=>{var _=W();U(_,"content",N),g(h,_)});var i=e(z(d),2);J(i,{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"});var l=e(i,2);r(l,{title:"JoyImageEditPlusTransformer3DModel",local:"joyimageeditplustransformer3dmodel",headingTag:"h1"});var m=e(l,4);P(m,{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEpveUltYWdlRWRpdFBsdXNUcmFuc2Zvcm1lcjNETW9kZWwlMEElMEF0cmFuc2Zvcm1lciUyMCUzRCUyMEpveUltYWdlRWRpdFBsdXNUcmFuc2Zvcm1lcjNETW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmpkb3BlbnNvdXJjZSUyRkpveUFJLUltYWdlLUVkaXQtUGx1cy1EaWZmdXNlcnMlMjIlMkMlMjBzdWJmb2xkZXIlM0QlMjJ0cmFuc2Zvcm1lciUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> JoyImageEditPlusTransformer3DModel
transformer = JoyImageEditPlusTransformer3DModel.from_pretrained(<span class="hljs-string">&quot;jdopensource/JoyAI-Image-Edit-Plus-Diffusers&quot;</span>, subfolder=<span class="hljs-string">&quot;transformer&quot;</span>, torch_dtype=torch.bfloat16)`,lang:"python",wrap:!1});var c=e(m,2);r(c,{title:"JoyImageEditPlusTransformer3DModel",local:"diffusers.JoyImageEditPlusTransformer3DModel",headingTag:"h2"});var o=e(c,2),f=n(o);s(f,{name:"class diffusers.JoyImageEditPlusTransformer3DModel",anchor:"diffusers.JoyImageEditPlusTransformer3DModel",source:"https://github.com/huggingface/diffusers/blob/vr_13966/src/diffusers/models/transformers/transformer_joyimage_edit_plus.py#L317",parameters:[{name:"patch_size",val:": list = [1, 2, 2]"},{name:"in_channels",val:": int = 16"},{name:"out_channels",val:": int | None = None"},{name:"hidden_size",val:": int = 3072"},{name:"num_attention_heads",val:": int = 24"},{name:"text_dim",val:": int = 4096"},{name:"mlp_width_ratio",val:": float = 4.0"},{name:"num_layers",val:": int = 20"},{name:"rope_dim_list",val:": list = [16, 56, 56]"},{name:"rope_type",val:": str = 'rope'"},{name:"theta",val:": int = 256"}],parametersDescription:[{anchor:"diffusers.JoyImageEditPlusTransformer3DModel.patch_size",description:`<strong>patch_size</strong> (<code>list</code>, defaults to <code>[1, 2, 2]</code>) &#x2014;
Patch size for patchifying the latent input along <code>(t, h, w)</code> dimensions.`,name:"patch_size"},{anchor:"diffusers.JoyImageEditPlusTransformer3DModel.in_channels",description:`<strong>in_channels</strong> (<code>int</code>, defaults to <code>16</code>) &#x2014;
The number of channels in the input latent.`,name:"in_channels"},{anchor:"diffusers.JoyImageEditPlusTransformer3DModel.out_channels",description:`<strong>out_channels</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The number of channels in the output. If not specified, it defaults to <code>in_channels</code>.`,name:"out_channels"},{anchor:"diffusers.JoyImageEditPlusTransformer3DModel.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, defaults to <code>3072</code>) &#x2014;
The dimensionality of the hidden representations.`,name:"hidden_size"},{anchor:"diffusers.JoyImageEditPlusTransformer3DModel.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, defaults to <code>24</code>) &#x2014;
The number of attention heads.`,name:"num_attention_heads"},{anchor:"diffusers.JoyImageEditPlusTransformer3DModel.text_dim",description:`<strong>text_dim</strong> (<code>int</code>, defaults to <code>4096</code>) &#x2014;
The dimensionality of the text encoder output.`,name:"text_dim"},{anchor:"diffusers.JoyImageEditPlusTransformer3DModel.mlp_width_ratio",description:`<strong>mlp_width_ratio</strong> (<code>float</code>, defaults to <code>4.0</code>) &#x2014;
The ratio of MLP hidden dimension to <code>hidden_size</code>.`,name:"mlp_width_ratio"},{anchor:"diffusers.JoyImageEditPlusTransformer3DModel.num_layers",description:`<strong>num_layers</strong> (<code>int</code>, defaults to <code>20</code>) &#x2014;
The number of double-stream transformer blocks.`,name:"num_layers"},{anchor:"diffusers.JoyImageEditPlusTransformer3DModel.rope_dim_list",description:`<strong>rope_dim_list</strong> (<code>list[int]</code>, defaults to <code>[16, 56, 56]</code>) &#x2014;
The dimensions for 3D rotary positional embeddings along <code>(t, h, w)</code>.`,name:"rope_dim_list"},{anchor:"diffusers.JoyImageEditPlusTransformer3DModel.rope_type",description:`<strong>rope_type</strong> (<code>str</code>, defaults to <code>&quot;rope&quot;</code>) &#x2014;
The type of rotary positional embedding.`,name:"rope_type"},{anchor:"diffusers.JoyImageEditPlusTransformer3DModel.theta",description:`<strong>theta</strong> (<code>int</code>, defaults to <code>256</code>) &#x2014;
The base frequency for rotary embeddings.`,name:"theta"}]});var u=e(f,8),b=n(u);s(b,{name:"forward",anchor:"diffusers.JoyImageEditPlusTransformer3DModel.forward",source:"https://github.com/huggingface/diffusers/blob/vr_13966/src/diffusers/models/transformers/transformer_joyimage_edit_plus.py#L444",parameters:[{name:"hidden_states",val:": Tensor"},{name:"timestep",val:": Tensor"},{name:"encoder_hidden_states",val:": Tensor"},{name:"encoder_hidden_states_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"shape_list",val:": list = None"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.JoyImageEditPlusTransformer3DModel.forward.hidden_states",description:"<strong>hidden_states</strong> &#x2014; [B, max_patches, C, pt, ph, pw] - patchified latent input.",name:"hidden_states"},{anchor:"diffusers.JoyImageEditPlusTransformer3DModel.forward.timestep",description:"<strong>timestep</strong> &#x2014; [B] - diffusion timestep.",name:"timestep"},{anchor:"diffusers.JoyImageEditPlusTransformer3DModel.forward.encoder_hidden_states",description:"<strong>encoder_hidden_states</strong> &#x2014; [B, L, D] - text encoder outputs.",name:"encoder_hidden_states"},{anchor:"diffusers.JoyImageEditPlusTransformer3DModel.forward.encoder_hidden_states_mask",description:"<strong>encoder_hidden_states_mask</strong> &#x2014; [B, L] - attention mask for text tokens.",name:"encoder_hidden_states_mask"},{anchor:"diffusers.JoyImageEditPlusTransformer3DModel.forward.shape_list",description:"<strong>shape_list</strong> &#x2014; Per-sample list of (t, h, w) tuples for each component (target + references).",name:"shape_list"},{anchor:"diffusers.JoyImageEditPlusTransformer3DModel.forward.return_dict",description:"<strong>return_dict</strong> &#x2014; Whether to return a dict or tuple.",name:"return_dict"}],returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>
<p>If <code>return_dict</code> is True, an <a
href="/docs/diffusers/pr_13966/en/api/models/sana_video_transformer3d#diffusers.models.modeling_outputs.Transformer2DModelOutput"
>Transformer2DModelOutput</a> is returned, otherwise a
<code>tuple</code> where the first element is the sample tensor.</p>
`}),a(u),a(o);var p=e(o,2);r(p,{title:"Transformer2DModelOutput",local:"diffusers.models.modeling_outputs.Transformer2DModelOutput",headingTag:"h2"});var t=e(p,2),D=n(t);s(D,{name:"class diffusers.models.modeling_outputs.Transformer2DModelOutput",anchor:"diffusers.models.modeling_outputs.Transformer2DModelOutput",source:"https://github.com/huggingface/diffusers/blob/vr_13966/src/diffusers/models/modeling_outputs.py#L21",parameters:[{name:"sample",val:": torch.Tensor"}],parametersDescription:[{anchor:"diffusers.models.modeling_outputs.Transformer2DModelOutput.sample",description:`<strong>sample</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code> or <code>(batch size, num_vector_embeds - 1, num_latent_pixels)</code> if <a href="/docs/diffusers/pr_13966/en/api/models/transformer2d#diffusers.Transformer2DModel">Transformer2DModel</a> is discrete) &#x2014;
The hidden states output conditioned on the <code>encoder_hidden_states</code> input. If discrete, returns probability
distributions for the unnoised latent pixels.`,name:"sample"}]}),y(2),a(t);var x=e(t,2);w(x,{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/models/transformer_joyimage_edit_plus.md"}),y(2),g(M,d),Z()}export{R as component};

Xet Storage Details

Size:
9.9 kB
·
Xet hash:
eb4cdebad6d4f05731adf19c9b6dccdf9849bb979d7b96558e651ab26b4610ae

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.