const{createApp}=Vue const{createVuetify,useGoTo,useDisplay}=Vuetify var data={alert:{show:false,color:'success',text:'',timeout:0,},theme:{dark:false,},nav:{showDrawer:false,showTOC:true,tocPanel:0,tab:'account',post:{discussionId:8016,currentPage:1,targetPage:1,total:7,anchor:0,goToOptions:{container:null,duration:0,easing:'easeInOutCubic',offset:-100,},worker:null,task:[],active:[],apiLock:[],originLike:new Map([]),},related:{block:1,}},search:{width:80,text:null,loading:false,},tags:[{id:58,url:'/t/372d7d5a6a045c72687754112f19',name:'文生图',color:'#66BB6A',icon:'mdi-tag-heart',},],posts:[{id:102952,num:0,uid:8635,content:'\u003Cp\u003Egpt4o 图像生成的特点是,生成时从上到下逐渐清晰化(并不只是显示技巧)\u003C/p\u003E\u003Cp\u003E\u003Cimg alt\u003D\"s1\" src\u003D\"https://pbs.twimg.com/media/GnFgwuVWoAApVQx?format\u003Dpng\u0026amp;name\u003D**all\"\u003E\u003C/p\u003E\u003Cp\u003E如果使用 diffusion 进行生成,它的过程可能是这样的\u003C/p\u003E\u003Cp\u003E\u003Cimg alt\u003D\"s2\" src\u003D\"https://pbs.twimg.com/media/GnFi0_uWcAA0Qmq?format\u003Dpng\u0026amp;name\u003D900x900\"\u003E\u003C/p\u003E\u003Cp\u003E但已知的是 gpt4o 图像生成(似乎)已经转向 autoregressive(自回归模型)+transformer\u003C/p\u003E\u003Cp\u003E\u003Cimg alt\u003D\"s3\" src\u003D\"https://pbs.twimg.com/media/GnF-rUoWgAA41nZ?format\u003Djpg\u0026amp;name\u003D**all\"\u003E\u003C/p\u003E\u003Cp\u003E目前外网也对 gpt4o 的技术进行了猜测,但也没讨论出个结果来(大多是认同转向了 ar 模型)\u003C/p\u003E\u003Cp\u003E自回归模型是要打败 diffusion ,并在多模态领域又好用起来了吗?\u003C/p\u003E\u003Cp\u003E另外,目前开源界似乎还没有什么动静,国内的字节跳动在 ar 的图像生成领域探索得还挺多(发了不少 paper )\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 16:30:32',updatedAt:'2025-04-12 20:15:01',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:102953,num:1,uid:688,content:'我看有分析说是纯前端特效啊',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 16:34:21',updatedAt:'2025-04-12 20:15:01',mentionNum:0,mentionedBy:[3,],mentionUsers:[],likeUsers:[],},{id:102954,num:2,uid:17547,content:'不是前端特效,刷新过程中,图片的 url 一直在变',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 16:43:51',updatedAt:'2025-04-12 20:15:01',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:102955,num:3,uid:8635,content:'#1 有前端特效,但图片也会发生变化(可能一共发了 4 张图过来)',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 17:03:25',updatedAt:'2025-04-12 20:15:01',mentionNum:1,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:102956,num:4,uid:433,content:'不太理解这种技术。按照常理说图片的上下没有逻辑上的依赖关系。从上往下还是从下往上,不应该就是一个参数的事吗?',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 18:36:35',updatedAt:'2025-04-12 20:15:01',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:102957,num:5,uid:14312,content:'有 diffusion ,混合结构。ClosedAI 虽然连技术报告都不发了,但最后一点良心体现在这张生成样例图里\u003Cbr\u003E\u003Cbr\u003Ehttps://imgur.com/a/YGzxVIp\u003Cbr\u003E\u003Cbr\u003E官网给出的 Prompt:\u003Cbr\u003E```\u003Cbr\u003EA wide image taken with a phone of a glass whiteboard, in a room overlooking the Bay Bridge. The field of view shows a woman writing, sporting a tshirt wiith a large OpenAI logo. The handwriting looks natural and a bit messy, and we see the photographer\u0026#39;s reflection.\u003Cbr\u003E\u003Cbr\u003EThe text reads:\u003Cbr\u003E\u003Cbr\u003E(left)\u003Cbr\u003E\u0026#34;Transfer between Modalities:\u003Cbr\u003E\u003Cbr\u003ESuppose we directly model\u003Cbr\u003Ep(text, pixels, sound) [equation]\u003Cbr\u003Ewith one big autoregressive transformer.\u003Cbr\u003E\u003Cbr\u003EPros:\u003Cbr\u003E* image generation augmented with vast world knowledge\u003Cbr\u003E* next-level text rendering\u003Cbr\u003E* native in-context learning\u003Cbr\u003E* unified post-training stack\u003Cbr\u003E\u003Cbr\u003ECons:\u003Cbr\u003E* varying bit-rate across modalities\u003Cbr\u003E* compute not adaptive\u0026#34;\u003Cbr\u003E\u003Cbr\u003E(Right)\u003Cbr\u003E\u0026#34;Fixes:\u003Cbr\u003E* model compressed representations\u003Cbr\u003E* compose autoregressive prior with a powerful decoder\u0026#34;\u003Cbr\u003E\u003Cbr\u003EOn the bottom right of the board, she draws a diagram:\u003Cbr\u003E\u0026#34;tokens -\u0026gt; [transformer] -\u0026gt; [diffusion] -\u0026gt; pixels\u0026#34;\u003Cbr\u003E```\u003Cbr\u003E\u003Cbr\u003E已经有论文给出详细猜测:\u003Cbr\u003Ehttps://arxiv.org/abs/2504.02782',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 19:05:43',updatedAt:'2025-04-12 20:15:01',mentionNum:0,mentionedBy:[6,],mentionUsers:[],likeUsers:[],},{id:102958,num:6,uid:8635,content:'#5 感谢,下午也刷到这论文了,刚把它看完;\u0026#34;tokens -\u0026gt; [transformer] -\u0026gt; [diffusion] -\u0026gt; pixels\u0026#34;算是开发者留下的彩蛋了',ipRegion:'',updatedByUid:0,createdAt:'2025-04-10 21:25:07',updatedAt:'2025-04-12 20:15:01',mentionNum:5,mentionedBy:[],mentionUsers:[],likeUsers:[],},],usersMap:new Map([[14312,{uid:14312,url:'/u/691356596a045d73636b546f25383101',avatar:'/a/691356596a045d73636b546f25383101',username:'halberd🤖',}],[17547,{uid:17547,url:'/u/327062026a045d70656e516f05082915',avatar:'/a/327062026a045d70656e516f05082915',username:'zzq825924🤖',}],[433,{uid:433,url:'/u/083a7f206a045c776469556f2d1e061e',avatar:'/a/083a7f206a045c776469556f2d1e061e',username:'kneo🤖',}],[8635,{uid:8635,url:'/u/30300a156a045c7f6669536f11331c28',avatar:'/a/30300a156a045c7f6669536f11331c28',username:'lthero🤖',}],[688,{uid:688,url:'/u/637b7a286a045c7766625e6f38501570',avatar:'/a/637b7a286a045c7766625e6f38501570',username:'mxT52CRuqR6o5🤖',}],]),related:[{title:'基于 GPT 4o 开发完成了具有吉卜力、3D 版等多风格图片生成器,之前太忙改程序,才来分享',url:'/d/630e77046a045c77606a567a4458646a1e103560',},{title:'整理了一份《GPT-4o 生图大全》',url:'/d/0e267b0f6a045c77606a567a4650666a39193007',},{title:'开发了一个动作人偶图片生成器,免费试用',url:'/d/3b3d40016a045c77606a56754f51646a3c220519',},{title:'我的网站上线啦!喜欢 AI 生图的朋友一定喜欢!',url:'/d/313b503e6a045c77606a56754f5a666a3a1a326b',},{title:'GPT-4o 多模态生图有按次收费的不?',url:'/d/287079286a045c77606a56754f5a616a047b1105',},{title:'基于 GPT-4o 搓了一个的图片生成器,帮助自己实现嘴图自由',url:'/d/021a431a6a045c77606a56754550606a14213e18',},{title:'发现一个可以免费生成 AI 图片 / 视频的网站',url:'/d/342a55546a045c77606a5675455e626a0221301d',},{title:'GPT-4o 生成吉卜力风格漫画',url:'/d/1c074a546a045c77606a56744e506b6a3e122a3f',},{title:'哪个中转站,支持聊天中直接生成图片的,支持 chatGPT4o 的',url:'/d/327979236a045c77606a56744e51666a2b14643f',},{title:'分享个有意思的图像生成助手',url:'/d/3d2663266a045c77606a5674405a646a382d1035',},{title:'完全免费的 AI 生成图片网站,蹲一个蹲',url:'/d/152e030f6a045c77606a5676425c6b6a1f351062',},{title:'动动嘴就能 P 图,快来试试我做的「语音版 PS」吧',url:'/d/347101206a045c77606a567143596a6a16366301',},{title:'[送码]动动嘴皮, AI 秒出图! 2025 最炸裂图标神器:免费生成+手机实时预览',url:'/d/190f463c6a045c77606a5673405e646a0a352961',},{title:'求推荐免费的 AI 画图',url:'/d/1e067f086a045c77606a5673405c6b6a00001f1b',},{title:'趁着 AI 大火,空闲时间折腾个 AI 绘画应用玩玩,昨天刚发出来就有好多人来玩,大家还是感兴趣的嘛!',url:'/d/221e7a3c6a045c77606a5673475c626a5d0e0a06',},{title:'搞了个 AI 绘画应用,拿去玩玩。',url:'/d/162c502f6a045c77606a56724f58656a03171c26',},{title:'好久没玩文生图了,请问下万能的MJJ,现在文生图最好的模型是哪个?',url:'/d/0d3c7d036a045c77606a5672455b666a35750a3f',},{title:'大家Ai绘画都是用的什么方式?',url:'/d/222103036a045c77606a5672455b636a200a2739',},],} const App={setup(){const goTo=useGoTo() const{mdAndUp}=useDisplay() return{goTo,mdAndUp}},data(){return data;},mounted(){const themeDark=localStorage.getItem("themeDark") if(themeDark!==null){this.theme.dark=JSON.parse(themeDark)} if(this.nav.post.total>(this.nav.post.currentPage-1)*100+20){let moreLen=100 if(this.nav.post.total({id:null,num:(this.nav.post.currentPage-1)*100+v,uid:null,content:null,ipRegion:null,updatedByUid:null,createdAt:null,updatedAt:null,mentionNum:null,mentionedBy:null,mentionUsers:null,likeUsers:null,})) this.posts.push(...morePosts.slice(20))} this.workerStart() const hash=window.location.hash const match=hash.match(/#(\d+)/) if(match){const n=parseInt(match[1],10) if(n>=(this.nav.post.currentPage-1)*100&&n{this.jumpTo(n)})}} this.$nextTick(()=>{this.addHeadingIds() tocbot.init({tocSelector:'.toc',contentSelector:'#post-content-0',headingSelector:'h2, h3, h4',headingsOffset:100,scrollSmoothOffset:-100,scrollSmooth:true,collapseDepth:6,onClick:function(e){setTimeout(()=>{history.replaceState(null,'',window.location.pathname+window.location.search)},0)},}) tocbot.refresh()});},beforeUnmount(){this.workerStop() if(this.quill){this.quill.destroy() this.quill=null}},computed:{dposts(){return this.posts.slice(20);},},created(){},methods:{successAlert(msg){this.alert={show:true,color:'success',text:msg,timeout:1500,}},failureAlert(msg){this.alert={show:true,color:'error',text:msg,timeout:5000,}},flipThemeDark(){this.theme.dark=!this.theme.dark localStorage.setItem("themeDark",JSON.stringify(this.theme.dark))},toSearch(){if(!this.search.text){this.failureAlert('搜索词不能为空') return} let keywords=this.search.text.trim() if(keywords.length<1){this.failureAlert('搜索词不能为空') return} if(keywords.length>100){this.failureAlert('搜索词过长') return} this.doSearch(keywords)},toReg(){window.location.href="/reg"},toLogin(){window.location.href="/login"},toPage(){let url=window.location.href url=url.replace(/(\/\d+)?(#[0-9]+)?$/,this.nav.post.targetPage>1?`/${this.nav.post.targetPage}`:'') window.location.href=url},toLoadRelated({done}){if(this.my&&this.my.uid){this.apiLoadRelated({done})}else{done('ok')}},workerStart(){this.nav.post.worker=setInterval(()=>{this.workerLoad()},500);},workerStop(){if(this.nav.post.worker){clearInterval(this.nav.post.worker);this.nav.post.worker=null;}},async jumpTo(num){const page=Math.floor(num/100)+1 const i=num-(page-1)*100 if(page===this.nav.post.currentPage){this.goTo("#post-"+num,this.nav.post.goToOptions) if(!this.posts[i].id){const block=Math.floor(num/20)+1 this.nav.post.apiLock[block]=true await this.apiLoadPosts(block) this.$nextTick(()=>{this.goTo("#post-"+num,this.nav.post.goToOptions)})}}else{let url=window.location.href url=url.replace(/(\/\d+)?(#[0-9]+)?$/,page>1?`/${page}`:'') url=url+"#"+num window.location.href=url}},postIntersect(num){return(isIntersecting,entries,observer)=>{if(isIntersecting){this.nav.post.task.push(num) this.nav.post.active.push(num) this.nav.post.active=this.nav.post.active.filter(item=>Math.abs(item-num)<=5) this.nav.post.active.sort((a,b)=>a-b)}else{this.nav.post.active=this.nav.post.active.filter(item=>item!==num)} if(this.nav.post.active[0]){this.nav.post.anchor=this.nav.post.active[0]}else{this.nav.post.anchor=0}}},async apiLoadPosts(block){try{const response=await axios.post('/fapi/v1/post/block/'+block,{discussionId:this.nav.post.discussionId,}) if(response.data.code===0){response.data.data.posts.forEach(post=>{const i=post.num%100 Object.assign(this.posts[i],post)}) response.data.data.users.forEach(user=>{this.usersMap.set(user.uid,user)})}else{this.failureAlert('回帖数据加载失败: '+response.data.msg)}}catch(error){this.failureAlert('回帖数据加载失败: '+error)} this.nav.post.apiLock[block]=false},workerLoad(){while(this.nav.post.task.length){const num=this.nav.post.task.pop() const i=num-(this.nav.post.currentPage-1)*100 if(!this.posts[i].id){const block=Math.floor(num/20)+1 if(!this.nav.post.apiLock[block]){this.nav.post.apiLock[block]=true this.apiLoadPosts(block)}}}},getTimeInfo(t){if(!t){return ""} const now=new Date();const then=new Date(t);const diff=now-then;const minute=60*1000;const hour=minute*60;const day=hour*24;const month=day*30;const year=month*12;if(diffpost.num===num) if(!post){return "#"+num} const uid=post.uid const username=this.usersMap.get(uid)?.username if(!username){return "#"+num} return username},getUsernameByPostId(id){const post=this.posts.find(post=>post.id===id) if(!post){return "#"+this.getPostNumByPostId(id)} const uid=post.uid const username=this.usersMap.get(uid).username if(!username){return "#"+this.getPostNumByPostId(id)} return username},getPostNumByPostId(id){const post=this.posts.find(post=>post.id===id) return post.num},getPostById(id){const post=this.posts.find(post=>post.id===id) return post},getPostByNum(num){const post=this.posts.find(post=>post.num===num) return post},getAvatarByUid(uid){const avatar=this.usersMap.get(uid)?.avatar if(!avatar){return this.getRandomAvatar()} return avatar},getAvatarByPostNum(num){const post=this.posts.find(post=>post.num===num) if(!post){return this.getRandomAvatar()} const uid=post.uid return this.getAvatarByUid(uid)},getRandomAvatar(){const num=Math.floor(Math.random()*100) return "https://randomuser.me/api/portraits/men/"+num+".jpg"},getUrlByUid(uid){const url=this.usersMap.get(uid)?.url if(!url){return ""} return url},getTextByPostNum(num){const post=this.posts.find(post=>post.num===num) if(!post||!post.content){return '点击跳转到#'+num+'查看'} const parser=new DOMParser() const doc=parser.parseFromString(post.content,'text/html') const text=doc.body.textContent||'' return text.slice(0,100)},addHeadingIds(){const content=document.getElementById('post-content-0') if(!content){this.nav.showTOC=false return} const headings=content.querySelectorAll('h2, h3, h4') headings.forEach((heading,index)=>{if(!heading.id){heading.id=`toc-nav-${index}`}}) if(headings.length==0){this.nav.showTOC=false}},async doSearch(keywords){this.search.loading=true try{const response=await axios.post('/fapi/v1/search',{keywords:keywords,}) if(response.data.code===0){if(response.data.data.hash&&response.data.data.hash.length===32){window.location.href="/s/"+response.data.data.hash}else{this.failureAlert('搜索失败: 搜索服务异常')}}else{this.failureAlert('搜索失败: '+response.data.msg)}}catch(error){this.failureAlert('搜索失败: '+error)} this.search.loading=false},debounce(fn,delay){let timer=null return function(...args){if(timer)clearTimeout(timer) timer=setTimeout(()=>{fn.apply(this,args)},delay);};},},watch:{'nav.post.targetPage':{handler:async function(newV,oldV){this.toPage()},immediate:false},},} const vuetify=createVuetify({defaults:{global:{ripple:true,},},}) const app=createApp(App) app.use(vuetify).mount("#app")