Buckets:

download
raw
8.62 kB
import"../chunks/DsnmJJEf.js";import{i as v,h as x,C as D,H as m,D as l,E as M,s as F}from"../chunks/BtE7mKSK.js";import{p as B,o as w,s as e,f as y,a as f,b as j,c as p,d as h,r as _,n as N}from"../chunks/jDjavuwI.js";const k='{"title":"BriaFiboTransformer2DModel","local":"briafibotransformer2dmodel","sections":[{"title":"BriaFiboTransformer2DModel","local":"diffusers.BriaFiboTransformer2DModel","sections":[],"depth":2}],"depth":1}';var z=h('<meta name="hf:doc:metadata"/>'),L=h('<p></p> <!> <!> <p>A modified flux Transformer model from <a href="https://huggingface.co/briaai/FIBO" rel="nofollow">Bria</a></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 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> <!> <p></p>',1);function O(u,g){B(g,!1),w(()=>{new URLSearchParams(window.location.search).get("fw")}),v();var r=L();x("1ogtlde",d=>{var c=z();F(c,"content",k),f(d,c)});var n=e(y(r),2);D(n,{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"});var t=e(n,2);m(t,{title:"BriaFiboTransformer2DModel",local:"briafibotransformer2dmodel",headingTag:"h1"});var s=e(t,4);m(s,{title:"BriaFiboTransformer2DModel",local:"diffusers.BriaFiboTransformer2DModel",headingTag:"h2"});var o=e(s,2),i=p(o);l(i,{name:"class diffusers.BriaFiboTransformer2DModel",anchor:"diffusers.BriaFiboTransformer2DModel",source:"https://github.com/huggingface/diffusers/blob/vr_13966/src/diffusers/models/transformers/transformer_bria_fibo.py#L429",parameters:[{name:"patch_size",val:": int = 1"},{name:"in_channels",val:": int = 64"},{name:"num_layers",val:": int = 19"},{name:"num_single_layers",val:": int = 38"},{name:"attention_head_dim",val:": int = 128"},{name:"num_attention_heads",val:": int = 24"},{name:"joint_attention_dim",val:": int = 4096"},{name:"pooled_projection_dim",val:": int = None"},{name:"guidance_embeds",val:": bool = False"},{name:"axes_dims_rope",val:": list = [16, 56, 56]"},{name:"rope_theta",val:" = 10000"},{name:"time_theta",val:" = 10000"},{name:"text_encoder_dim",val:": int = 2048"}],parametersDescription:[{anchor:"diffusers.BriaFiboTransformer2DModel.patch_size",description:"<strong>patch_size</strong> (<code>int</code>) &#x2014; Patch size to turn the input data into small patches.",name:"patch_size"},{anchor:"diffusers.BriaFiboTransformer2DModel.in_channels",description:"<strong>in_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014; The number of channels in the input.",name:"in_channels"},{anchor:"diffusers.BriaFiboTransformer2DModel.num_layers",description:"<strong>num_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 18) &#x2014; The number of layers of MMDiT blocks to use.",name:"num_layers"},{anchor:"diffusers.BriaFiboTransformer2DModel.num_single_layers",description:"<strong>num_single_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 18) &#x2014; The number of layers of single DiT blocks to use.",name:"num_single_layers"},{anchor:"diffusers.BriaFiboTransformer2DModel.attention_head_dim",description:"<strong>attention_head_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014; The number of channels in each head.",name:"attention_head_dim"},{anchor:"diffusers.BriaFiboTransformer2DModel.num_attention_heads",description:"<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 18) &#x2014; The number of heads to use for multi-head attention.",name:"num_attention_heads"},{anchor:"diffusers.BriaFiboTransformer2DModel.joint_attention_dim",description:"<strong>joint_attention_dim</strong> (<code>int</code>, <em>optional</em>) &#x2014; The number of <code>encoder_hidden_states</code> dimensions to use.",name:"joint_attention_dim"},{anchor:"diffusers.BriaFiboTransformer2DModel.pooled_projection_dim",description:"<strong>pooled_projection_dim</strong> (<code>int</code>) &#x2014; Number of dimensions to use when projecting the <code>pooled_projections</code>.",name:"pooled_projection_dim"},{anchor:"diffusers.BriaFiboTransformer2DModel.guidance_embeds",description:"<strong>guidance_embeds</strong> (<code>bool</code>, defaults to False) &#x2014; Whether to use guidance embeddings.",name:"guidance_embeds"},{anchor:"diffusers.BriaFiboTransformer2DModel.…",description:"<strong>&#x2026;</strong> &#x2014;",name:"…"}]});var a=e(i,2),b=p(a);l(b,{name:"forward",anchor:"diffusers.BriaFiboTransformer2DModel.forward",source:"https://github.com/huggingface/diffusers/blob/vr_13966/src/diffusers/models/transformers/transformer_bria_fibo.py#L510",parameters:[{name:"hidden_states",val:": Tensor"},{name:"encoder_hidden_states",val:": Tensor = None"},{name:"text_encoder_layers",val:": list = None"},{name:"pooled_projections",val:": Tensor = None"},{name:"timestep",val:": LongTensor = None"},{name:"img_ids",val:": Tensor = None"},{name:"txt_ids",val:": Tensor = None"},{name:"guidance",val:": Tensor = None"},{name:"joint_attention_kwargs",val:": dict[str, typing.Any] | None = None"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.BriaFiboTransformer2DModel.forward.hidden_states",description:`<strong>hidden_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch size, channel, height, width)</code>) &#x2014;
Input <code>hidden_states</code>.`,name:"hidden_states"},{anchor:"diffusers.BriaFiboTransformer2DModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch size, sequence_len, embed_dims)</code>) &#x2014;
Conditional embeddings (embeddings computed from the input conditions such as prompts) to use.`,name:"encoder_hidden_states"},{anchor:"diffusers.BriaFiboTransformer2DModel.forward.text_encoder_layers",description:`<strong>text_encoder_layers</strong> (<code>list</code> of <code>torch.Tensor</code>) &#x2014;
Per-block text encoder hidden states, one tensor per transformer block.`,name:"text_encoder_layers"},{anchor:"diffusers.BriaFiboTransformer2DModel.forward.pooled_projections",description:`<strong>pooled_projections</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, projection_dim)</code>) &#x2014; Embeddings projected
from the embeddings of input conditions.`,name:"pooled_projections"},{anchor:"diffusers.BriaFiboTransformer2DModel.forward.timestep",description:`<strong>timestep</strong> ( <code>torch.LongTensor</code>) &#x2014;
Used to indicate denoising step.`,name:"timestep"},{anchor:"diffusers.BriaFiboTransformer2DModel.forward.img_ids",description:`<strong>img_ids</strong> (<code>torch.Tensor</code>) &#x2014;
Image position ids used to compute the rotary positional embeddings.`,name:"img_ids"},{anchor:"diffusers.BriaFiboTransformer2DModel.forward.txt_ids",description:`<strong>txt_ids</strong> (<code>torch.Tensor</code>) &#x2014;
Text position ids used to compute the rotary positional embeddings.`,name:"txt_ids"},{anchor:"diffusers.BriaFiboTransformer2DModel.forward.guidance",description:`<strong>guidance</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Guidance scale embedding used for guidance-distilled variants of the model.`,name:"guidance"},{anchor:"diffusers.BriaFiboTransformer2DModel.forward.joint_attention_kwargs",description:`<strong>joint_attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
A kwargs dictionary that if specified is passed along to the <code>AttentionProcessor</code> as defined under
<code>self.processor</code> in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow">diffusers.models.attention_processor</a>.`,name:"joint_attention_kwargs"},{anchor:"diffusers.BriaFiboTransformer2DModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <code>~models.transformer_2d.Transformer2DModelOutput</code> instead of a plain
tuple.`,name:"return_dict"}],returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>
<p>If <code>return_dict</code> is True, an <code>~models.transformer_2d.Transformer2DModelOutput</code> is returned, otherwise a
<code>tuple</code> where the first element is the sample tensor.</p>
`}),_(a),_(o);var T=e(o,2);M(T,{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/models/transformer_bria_fibo.md"}),N(2),f(u,r),j()}export{O as component};

Xet Storage Details

Size:
8.62 kB
·
Xet hash:
849f966804e5b511cfade8e501df7b7bffb606128272cd049cb704efc9903841

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