1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5a374231-27d5-4edf-abc0-229cba415877",e._sentryDebugIdIdentifier="sentry-dbid-5a374231-27d5-4edf-abc0-229cba415877")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5782],{46379:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/model/[uuid]/edit",function(){return r(5386)}])},60815:function(e,t,r){"use strict";var n=r(37685);t.Z=function(e){return Object.freeze({axiosInstance:e,listThemeSchedules:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:30;return e.get("/theme_schedules",{params:{limit:t}}).then(e=>e.data)},listPublicTagsOfUser:function(t){return e.get("/users/".concat(t,"/tags")).then(e=>e.data)},listPrivateTagsOfUser:function(){return e.get("/user/private_tags").then(e=>e.data)},search:function(t){let{q:r,page:s=1,per_page:o=20}=t;return e.get("/search/tags",{params:{q:r,page:s,per_page:o}}).then(e=>({data:e.data,...(0,n.dr)(e)}))},suggest:function(t){return e.get("/suggest/tags",{params:{q:t}}).then(e=>e.data)}})}},89769:function(e,t,r){"use strict";r.d(t,{Z:function(){return u}});var n=r(85893),s=r(44457),o=r(79986);function u(e){let{...t}=e;return(0,n.jsx)(s.Ph,{rightSection:(0,n.jsx)(o.x9,{size:"0.8rem"}),rightSectionWidth:30,styles:e=>({rightSection:{pointerEvents:"none"},item:{fontSize:e.fontSizes.md}}),...t})}},18877:function(e,t,r){"use strict";var n=r(85893),s=r(72445);t.Z=function(e){let{children:t,...r}=e;return(0,n.jsx)(s.W,{sx:e=>({width:"100%",maxWidth:"80rem",padding:"4rem 2rem",[e.fn.smallerThan("sm")]:{width:"100%",padding:"var(--mobile-vertical-padding) var(--mobile-horizontal-padding)"}}),...r,children:t})}},13193:function(e,t,r){"use strict";r.d(t,{GH:function(){return a},SL:function(){return s},ZR:function(){return o},f8:function(){return p},h0:function(){return n},ju:function(){return d},sA:function(){return u}});let n=50,s=10,o=5242880,u=30,p=8e3,a=15032385536,d=["fp8","fp16","bf16"]},85822:function(e,t,r){"use strict";var n=r(85893),s=r(41664),o=r.n(s),u=r(67841),p=r(37825),a=r(17657);t.Z=function(e){let t,{value:r,tagType:s,linked:d=!0,onClick:l,...i}=e,c=(0,p.n)();"post"===s&&(t=c.tag(r)),"model"===s&&(t=c.taggedModels(r));let h=t&&d?{component:o(),href:t}:{},B=(0,a.cI)(r);return(0,n.jsxs)(u.z,{fz:"xs",h:"1.8rem",mah:"1.8rem",px:8,sx:{textTransform:"uppercase",transform:"none",":active":{transform:"none"},backgroundColor:B,":hover":{backgroundColor:B}},onClick:l,...h,...i,children:["#",r]})}},93302:function(e,t,r){"use strict";r.d(t,{Z:function(){return B}});var n=r(85893),s=r(67294),o=r(64523),u=r(44457),p=r(71232),a=r(39759),d=r(60815),l=r(54102),i=r(79986),c=r(85822);let h=e=>e.replace(/[^a-zA-Z0-9]/g,"").trim().slice(0,20);function B(e){let{values:t,maxCount:r=10,onChange:B,autocompleteTagList:T,...N}=e,[E,f]=(0,s.useState)(""),[x]=(0,a.c)(E,200),[A,Y]=(0,s.useState)({}),O=(0,s.useMemo)(()=>(0,d.Z)((0,l.b)()),[]);(0,s.useEffect)(()=>{!T&&x.length>=2&&O.suggest(x).then(e=>{Y(t=>({...t,[x]:e}))})},[T,x,O]);let m=(0,s.useMemo)(()=>E.length<2?[]:T||A[x]||[],[E.length,T,A,x]);return(0,n.jsxs)(o.x,{...N,children:[(0,n.jsx)(u.Ph,{data:m,placeholder:"Enter tag..",maxLength:20,styles:{rightSection:{display:"none"}},icon:(0,n.jsx)(i.W1,{size:"1.1rem"}),searchable:!0,creatable:!0,onCreate:e=>{let n=h(e);return n&&t.length<r&&!t.includes(n)&&(null==B||B([...t,n])),f(""),null},searchValue:E,onSearchChange:e=>{(0===e.length||e.trim().length>0)&&f(e)},value:"",getCreateLabel:e=>"+ ".concat(e),onChange:e=>{if(!e)return;let n=h(e);n&&t.length<r&&!t.includes(n)&&(null==B||B([...t,n])),f("")},withinPortal:!0,zIndex:400}),(0,n.jsx)(p.Z,{mt:"1rem",spacing:4,mih:"2rem",children:t.map(e=>(0,n.jsx)(o.x,{onClick:()=>{null==B||B(t.filter(t=>t!==e))},children:(0,n.jsx)(c.Z,{value:e,rightIcon:(0,n.jsx)(i.Tw,{size:"1rem"})})},e))})]})}},55087:function(e,t,r){"use strict";r.d(t,{A$:function(){return Y},JM:function(){return b},Ph:function(){return C},V_:function(){return I},Vi:function(){return O}
1,Xy:function(){return g},ZE:function(){return m},lg:function(){return L},vj:function(){return y}});var n=r(78798);let s={base:n.nN.SD,supportedTypes:[n.BY.CHECKPOINT,n.BY.LORA,n.BY.EMBEDDING],supportedUploadTypes:[n.BY.CHECKPOINT,n.BY.LORA,n.BY.EMBEDDING],supportedUploadTypesForAuthorized:[n.BY.CHECKPOINT,n.BY.LORA,n.BY.EMBEDDING],text:"SD",shortText:"SD"},o={base:n.nN.SDXL,supportedTypes:[n.BY.CHECKPOINT,n.BY.LORA,n.BY.EMBEDDING],supportedUploadTypes:[n.BY.CHECKPOINT,n.BY.LORA,n.BY.EMBEDDING],supportedUploadTypesForAuthorized:[n.BY.CHECKPOINT,n.BY.LORA,n.BY.EMBEDDING],text:"SDXL",shortText:"SDXL"},u={base:n.nN.ILXL,supportedTypes:[n.BY.CHECKPOINT,n.BY.LORA,n.BY.EMBEDDING],supportedUploadTypes:[n.BY.CHECKPOINT,n.BY.LORA,n.BY.EMBEDDING],supportedUploadTypesForAuthorized:[n.BY.CHECKPOINT,n.BY.LORA,n.BY.EMBEDDING],text:"Illustrious",shortText:"IL"},p={base:n.nN.PDXL,supportedTypes:[n.BY.CHECKPOINT,n.BY.LORA,n.BY.EMBEDDING],supportedUploadTypes:[n.BY.CHECKPOINT,n.BY.LORA,n.BY.EMBEDDING],supportedUploadTypesForAuthorized:[n.BY.CHECKPOINT,n.BY.LORA,n.BY.EMBEDDING],text:"Pony",shortText:"Pony"},a={base:n.nN.NOOBAI,supportedTypes:[n.BY.CHECKPOINT,n.BY.LORA,n.BY.EMBEDDING],supportedUploadTypes:[n.BY.CHECKPOINT,n.BY.LORA,n.BY.EMBEDDING],supportedUploadTypesForAuthorized:[n.BY.CHECKPOINT,n.BY.LORA,n.BY.EMBEDDING],text:"NoobAI",shortText:"NoobAI"},d={base:n.nN.SD35,supportedTypes:[n.BY.CHECKPOINT,n.BY.LORA],supportedUploadTypes:[n.BY.LORA],supportedUploadTypesForAuthorized:[n.BY.LORA],text:"SD3.5",shortText:"SD3.5"},l={base:n.nN.FLUX1D,supportedTypes:[n.BY.CHECKPOINT,n.BY.LORA],supportedUploadTypes:[n.BY.LORA],supportedUploadTypesForAuthorized:[n.BY.LORA],text:"Flux",shortText:"Flux"},i={base:n.nN.FLUX_CHROMA,supportedTypes:[n.BY.CHECKPOINT,n.BY.LORA],supportedUploadTypes:[n.BY.LORA],supportedUploadTypesForAuthorized:[n.BY.LORA],text:"Flux Chroma",shortText:"Chroma"},c={base:n.nN.FLUX_KREA,supportedTypes:[n.BY.CHECKPOINT,n.BY.LORA],supportedUploadTypes:[n.BY.LORA],supportedUploadTypesForAuthorized:[n.BY.LORA],text:"Flux Krea",shortText:"Krea"},h={base:n.nN.FLUX_KONTEXT,supportedTypes:[n.BY.CHECKPOINT],supportedUploadTypes:[],supportedUploadTypesForAuthorized:[],text:"Flux Kontext",shortText:"Kontext"},B={base:n.nN.FLUX_FILL,supportedTypes:[n.BY.CHECKPOINT],supportedUploadTypes:[],supportedUploadTypesForAuthorized:[],text:"Flux Fill",shortText:"Fill",deprecated:!0},T={base:n.nN.FLUX2_KLEIN,supportedTypes:[n.BY.CHECKPOINT,n.BY.LORA],supportedUploadTypes:[n.BY.LORA],supportedUploadTypesForAuthorized:[n.BY.LORA],text:"Flux2 Klein",shortText:"Klein"},N={base:n.nN.QWEN_IMAGE,supportedTypes:[n.BY.CHECKPOINT,n.BY.LORA],supportedUploadTypes:[n.BY.LORA],supportedUploadTypesForAuthorized:[n.BY.LORA],text:"Qwen Image",shortText:"Qwen"},E={base:n.nN.Z_IMAGE_BASE,supportedTypes:[n.BY.CHECKPOINT,n.BY.LORA],supportedUploadTypes:[n.BY.LORA],supportedUploadTypesForAuthorized:[n.BY.LORA],text:"Z-Image Base",shortText:"ZIB"},f={base:n.nN.Z_IMAGE_TURBO,supportedTypes:[n.BY.CHECKPOINT,n.BY.LORA],supportedUploadTypes:[n.BY.LORA],supportedUploadTypesForAuthorized:[n.BY.CHECKPOINT,n.BY.LORA],text:"Z-Image Turbo",shortText:"ZIT"},x={base:n.nN.ANIMA,supportedTypes:[n.BY.CHECKPOINT,n.BY.LORA],supportedUploadTypes:[n.BY.LORA],supportedUploadTypesForAuthorized:[n.BY.CHECKPOINT,n.BY.LORA],text:"Anima",shortText:"Anima"},A={base:n.nN.KREA2,supportedTypes:[n.BY.CHECKPOINT,n.BY.LORA],supportedUploadTypes:[n.BY.LORA],supportedUploadTypesForAuthorized:[n.BY.CHECKPOINT,n.BY.LORA],text:"Krea2",shortText:"Krea2"};function Y(e){switch(e){case n.nN.SD:return s;case n.nN.SDXL:return o;case n.nN.ILXL:return u;case n.nN.PDXL:return p;case n.nN.NOOBAI:return a;case n.nN.SD35:return d;case n.nN.FLUX1D:return l;case n.nN.FLUX_CHROMA:return i;case n.nN.FLUX_KREA:return c;case n.nN.FLUX_KONTEXT:return h;case n.nN.FLUX_FILL:return B;case n.nN.FLUX2_KLEIN:return T;case n.nN.QWEN_IMAGE:return N;case n.nN.Z_IMAGE_BASE:return E;case n.nN.Z_IMAGE_TURBO:return f;case n.nN.ANIMA:return x;case n.nN.KREA2:return A;default:return o}}function O(e){return Y(e).supportedTypes.includes(n.BY.EMBEDDING)}function m(e){return Y(e).supportedTypes.includes(n.BY.LORA)}function I(){return Object.values(n.nN).map(e=>Y(e)).filter(e=>!e.deprecated)}let L=I().map(e=>({label:e.text,value:e.base})),C=[{label:"Checkpoint",value:n.BY.CHECKPOINT},{value:n.BY.EMBEDDING,label:"Embedding"},{value:n.BY.LORA,label:"LoRA"}];function y(e){return Y(e).text}function g(e){return Y(e).shortText}function b(e){for(let t of C)if(t.value===e)return t.label;return e}},5386:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return g},default:function(){return b}});var n=r(85893),s=r(47389),o=r(18877),u=r(13480),p=r(67294),a=r(11163),d=r(64523),l=r(19236),i=r(97564),c=r(80061),h=r(94151),B=r(54777),T=r(38078),N=r(71232),E=r(67841),f=r(77248),x=r(98029),A=r(14801),Y=r(54102),O=r(55087),m=r(37825),I=r
1(89769),L=r(93302),C=r(13193),y=function(e){let{model:t,...r}=e,s=(0,a.useRouter)(),o=(0,m.n)(),u=(0,A.Z)((0,Y.b)()),y=(0,f.c)({initialValues:{name:t.name,base:t.base,type:t.type,nsfw:t.nsfw,real_person:t.real_person,authored:t.authored},validate:{name:e=>e.trim().length<1?"Cannot be empty":null}}),[g,b]=(0,p.useState)(t.tags),[R,D]=(0,p.useState)(!1),P=(0,x.D)({mutationFn:e=>u.update(t.uuid,e).then(e=>e),onMutate:()=>{D(!0)},onSuccess:e=>{s.push(o.model(e.uuid))},onError:()=>{D(!1)}}),U=!y.isValid();return(0,n.jsxs)(d.x,{...r,children:[(0,n.jsx)(l.D,{order:3,mb:"2rem",children:"Edit model"}),(0,n.jsxs)("form",{onSubmit:y.onSubmit(e=>{P.mutate({...e,tags:g})}),children:[(0,n.jsxs)(i.K,{spacing:"1.5rem",children:[(0,n.jsx)(c.o,{label:"Model name",withAsterisk:!0,placeholder:"My Awesome Model",maxLength:C.h0,...y.getInputProps("name")}),(0,n.jsx)(I.Z,{label:"Model base",withAsterisk:!0,disabled:!0,data:O.lg,...y.getInputProps("base")}),(0,n.jsx)(I.Z,{label:"Model type",withAsterisk:!0,disabled:!0,data:O.Ph,...y.getInputProps("type")}),(0,n.jsx)(h.I.Wrapper,{label:"Tags",children:(0,n.jsx)(L.Z,{maxCount:C.SL,values:g,onChange:e=>{b(e)}})})]}),(0,n.jsx)(B.i,{my:"2rem"}),(0,n.jsx)(T.X,{label:"Explicit content",mt:"1rem",size:"md",...y.getInputProps("nsfw",{type:"checkbox"})}),(0,n.jsx)(T.X,{label:"Depicts a real person (e.g., celebrity)",mt:"1rem",size:"md",...y.getInputProps("real_person",{type:"checkbox"})}),(0,n.jsx)(T.X,{label:"I'm the author of this model",mt:"1rem",size:"md",...y.getInputProps("authored",{type:"checkbox"})}),(0,n.jsxs)(N.Z,{position:"right",mt:"2rem",spacing:8,children:[(0,n.jsx)(E.z,{variant:"default",onClick:()=>{s.push(o.model(t.uuid))},children:"Cancel"}),(0,n.jsx)(E.z,{type:"submit",color:"green",loading:R,disabled:U,children:"Save"})]})]})]})},g=!0;function b(e){let{model:t}=e;return(0,n.jsx)(o.Z,{maw:"50rem",children:(0,n.jsx)(y,{model:t})})}b.getLayout=function(e,t){let{self:r}=t;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.Z,{title:"Edit model"}),(0,n.jsx)(s.Z,{self:r,children:e})]})}}},function(e){e.O(0,[5970,8391,2651,5777,3835,4457,7089,2929,2888,9774,179],function(){return e(e.s=46379)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.