当前位置: 首页 > news >正文

安福相册网站怎么做的seo按照搜索引擎的什么对网站

安福相册网站怎么做的,seo按照搜索引擎的什么对网站,金华建设局政务网站,宠物网站项目本地部署文生图模型 Flux 0. 引言1. 本地部署1-1. 创建虚拟环境1-2. 安装依赖模块1-3. 创建 Web UI1-4. 启动 Web UI1-5. 访问 Web UI 0. 引言 2024年8月1日,blackforestlabs.ai发布了 FLUX.1 模型套件。 FLUX.1 文本到图像模型套件,该套件定义了文本到…

本地部署文生图模型 Flux

  • 0. 引言
  • 1. 本地部署
    • 1-1. 创建虚拟环境
    • 1-2. 安装依赖模块
    • 1-3. 创建 Web UI
    • 1-4. 启动 Web UI
    • 1-5. 访问 Web UI

在这里插入图片描述

0. 引言

2024年8月1日,blackforestlabs.ai发布了 FLUX.1 模型套件。

FLUX.1 文本到图像模型套件,该套件定义了文本到图像合成的图像细节、提示依从性、样式多样性和场景复杂性的新技术。

为了在可访问性和模型功能之间取得平衡,FLUX.1 有三种变体:FLUX.1 [pro]、FLUX.1 [dev] 和 FLUX.1 [schnell]:

  • FLUX.1 [pro]:FLUX.1 的佼佼者,提供最先进的性能图像生成,具有顶级的提示跟随、视觉质量、图像细节和输出多样性。在此处通过我们的 API 注册 FLUX.1 [pro] 访问权限。FLUX.1 [pro] 也可通过 Replicate 和 fal.ai 获得。
  • FLUX.1 [dev]:FLUX.1 [dev] 是一个用于非商业应用的开放权重、指导蒸馏模型。FLUX.1 [dev] 直接从 FLUX.1 [pro] 蒸馏而来,获得了相似的质量和快速粘附能力,同时比相同尺寸的标准模型效率更高。FLUX.1 [dev] 权重在 HuggingFace 上可用,可以直接在 Replicate 或 Fal.ai 上试用。
  • FLUX.1 [schnell]:我们最快的模型是为本地开发和个人使用量身定制的。FLUX.1 [schnell] 在 Apache2.0 许可下公开可用。类似,FLUX.1 [dev],权重在Hugging Face上可用,推理代码可以在GitHub和HuggingFace的Diffusers中找到。

1. 本地部署

1-1. 创建虚拟环境

conda create -n flux python=3.11 -y
conda activate flux

1-2. 安装依赖模块

git clone https://github.com/black-forest-labs/flux; cd flux
pip install -e '.[all]'
pip install accelerate
pip install git+https://github.com/huggingface/diffusers.git
pip install optimum-quanto
pip install gradio

1-3. 创建 Web UI

import torchimport gradio as grfrom optimum.quanto import freeze, qfloat8, quantizefrom diffusers import FlowMatchEulerDiscreteScheduler, AutoencoderKL
from diffusers.models.transformers.transformer_flux import FluxTransformer2DModel
from diffusers.pipelines.flux.pipeline_flux import FluxPipeline
from transformers import CLIPTextModel, CLIPTokenizer,T5EncoderModel, T5TokenizerFastdtype = torch.bfloat16# schnell is the distilled turbo model. For the CFG distilled model, use:
# bfl_repo = "black-forest-labs/FLUX.1-dev"
# revision = "refs/pr/3"
#
# The undistilled model that uses CFG ("pro") which can use negative prompts
# was not released.
bfl_repo = "black-forest-labs/FLUX.1-schnell"
revision = "refs/pr/1"
# bfl_repo = "black-forest-labs/FLUX.1-dev"
# revision = "main"scheduler = FlowMatchEulerDiscreteScheduler.from_pretrained(bfl_repo, subfolder="scheduler", revision=revision)
text_encoder = CLIPTextModel.from_pretrained("openai/clip-vit-large-patch14", torch_dtype=dtype)
tokenizer = CLIPTokenizer.from_pretrained("openai/clip-vit-large-patch14", torch_dtype=dtype)
text_encoder_2 = T5EncoderModel.from_pretrained(bfl_repo, subfolder="text_encoder_2", torch_dtype=dtype, revision=revision)
tokenizer_2 = T5TokenizerFast.from_pretrained(bfl_repo, subfolder="tokenizer_2", torch_dtype=dtype, revision=revision)
vae = AutoencoderKL.from_pretrained(bfl_repo, subfolder="vae", torch_dtype=dtype, revision=revision)
transformer = FluxTransformer2DModel.from_pretrained(bfl_repo, subfolder="transformer", torch_dtype=dtype, revision=revision)# Experimental: Try this to load in 4-bit for <16GB cards.
#
# from optimum.quanto import qint4
# quantize(transformer, weights=qint4, exclude=["proj_out", "x_embedder", "norm_out", "context_embedder"])
# freeze(transformer)
quantize(transformer, weights=qfloat8)
freeze(transformer)quantize(text_encoder_2, weights=qfloat8)
freeze(text_encoder_2)pipe = FluxPipeline(scheduler=scheduler,text_encoder=text_encoder,tokenizer=tokenizer,text_encoder_2=None,tokenizer_2=tokenizer_2,vae=vae,transformer=None,
)
pipe.text_encoder_2 = text_encoder_2
pipe.transformer = transformer
pipe.enable_model_cpu_offload()def generate(prompt, steps, guidance, width, height, seed):if seed == -1:seed = torch.seed()generator = torch.Generator().manual_seed(int(seed))image = pipe(prompt=prompt,width=width,height=height,num_inference_steps=steps,generator=generator,guidance_scale=guidance,).images[0]return imagedemo = gr.Interface(fn=generate, inputs=["textbox", gr.Number(value=4), gr.Number(value=3.5), gr.Slider(0, 1920, value=1024, step=2), gr.Slider(0, 1920, value=1024, step=2), gr.Number(value=-1)], outputs="image")demo.launch(server_name="0.0.0.0")

1-4. 启动 Web UI

python flux_on_potato.py

1-5. 访问 Web UI

使用浏览器打开 http://localhost:7860 就可以访问了。

在这里插入图片描述

reference:

  • https://blackforestlabs.ai/announcing-black-forest-labs/
  • https://github.com/black-forest-labs/flux/
  • https://github.com/black-forest-labs/flux/issues/7
  • https://gist.github.com/AmericanPresidentJimmyCarter/873985638e1f3541ba8b00137e7dacd9

文章转载自:
http://dinncosubliterary.ydfr.cn
http://dinncoplanaria.ydfr.cn
http://dinncorusticity.ydfr.cn
http://dinncodistent.ydfr.cn
http://dinncowhap.ydfr.cn
http://dinncosubadar.ydfr.cn
http://dinncoepirot.ydfr.cn
http://dinncoirrevocably.ydfr.cn
http://dinncobehead.ydfr.cn
http://dinncoencrinite.ydfr.cn
http://dinncofulminating.ydfr.cn
http://dinncofork.ydfr.cn
http://dinncoundo.ydfr.cn
http://dinncooutsail.ydfr.cn
http://dinncouncrowded.ydfr.cn
http://dinncosniveler.ydfr.cn
http://dinncoparochial.ydfr.cn
http://dinncoawkwardly.ydfr.cn
http://dinncohalfheartedly.ydfr.cn
http://dinncoglycolipid.ydfr.cn
http://dinncosmeech.ydfr.cn
http://dinncoswab.ydfr.cn
http://dinncowheresoever.ydfr.cn
http://dinncoseparate.ydfr.cn
http://dinncodecretive.ydfr.cn
http://dinncohellespont.ydfr.cn
http://dinncomatrass.ydfr.cn
http://dinncotunnel.ydfr.cn
http://dinncoarchanthropine.ydfr.cn
http://dinncodiammonium.ydfr.cn
http://dinncopalp.ydfr.cn
http://dinncofarcetta.ydfr.cn
http://dinncoceasefire.ydfr.cn
http://dinncokelp.ydfr.cn
http://dinncopurine.ydfr.cn
http://dinncoprefectural.ydfr.cn
http://dinncointerjection.ydfr.cn
http://dinncoduka.ydfr.cn
http://dinncocrunch.ydfr.cn
http://dinncodiamine.ydfr.cn
http://dinncoumt.ydfr.cn
http://dinncodramaturgic.ydfr.cn
http://dinncohindmost.ydfr.cn
http://dinncotackey.ydfr.cn
http://dinncopeevy.ydfr.cn
http://dinncoreloader.ydfr.cn
http://dinncovideorecord.ydfr.cn
http://dinncofinnip.ydfr.cn
http://dinncocrystallogram.ydfr.cn
http://dinncowomanise.ydfr.cn
http://dinncoenthymeme.ydfr.cn
http://dinnconorthwards.ydfr.cn
http://dinncorutilant.ydfr.cn
http://dinncobrownness.ydfr.cn
http://dinncovelocipede.ydfr.cn
http://dinncomorty.ydfr.cn
http://dinncocylindrical.ydfr.cn
http://dinncocabaret.ydfr.cn
http://dinncolazuline.ydfr.cn
http://dinncoroue.ydfr.cn
http://dinncomoffie.ydfr.cn
http://dinncobailjumper.ydfr.cn
http://dinncoundistracted.ydfr.cn
http://dinncotypicality.ydfr.cn
http://dinncoxylotomous.ydfr.cn
http://dinncooleo.ydfr.cn
http://dinncodemulcent.ydfr.cn
http://dinncotablespoonful.ydfr.cn
http://dinncopsychodelic.ydfr.cn
http://dinncoprorate.ydfr.cn
http://dinncocarbonization.ydfr.cn
http://dinncoinvariant.ydfr.cn
http://dinncoquahog.ydfr.cn
http://dinncorabbah.ydfr.cn
http://dinncocraniology.ydfr.cn
http://dinncomenes.ydfr.cn
http://dinncounderinsured.ydfr.cn
http://dinncowe.ydfr.cn
http://dinncoyoungster.ydfr.cn
http://dinncoomsk.ydfr.cn
http://dinncones.ydfr.cn
http://dinncodengue.ydfr.cn
http://dinncojuvenescent.ydfr.cn
http://dinnconourice.ydfr.cn
http://dinncocubanize.ydfr.cn
http://dinncooop.ydfr.cn
http://dinncocerography.ydfr.cn
http://dinncoroper.ydfr.cn
http://dinncononinflammable.ydfr.cn
http://dinncoproximity.ydfr.cn
http://dinncoanhinga.ydfr.cn
http://dinncounderscrub.ydfr.cn
http://dinncopiecrust.ydfr.cn
http://dinncomx.ydfr.cn
http://dinncorampion.ydfr.cn
http://dinncosuppress.ydfr.cn
http://dinncobioecology.ydfr.cn
http://dinncoethnicity.ydfr.cn
http://dinncohsining.ydfr.cn
http://dinncobanc.ydfr.cn
http://www.dinnco.com/news/119412.html

相关文章:

  • 鹰潭网站商城建设域名批量注册查询
  • 智能小程序入口厦门seo关键词优化代运营
  • 东莞如何建网站费用网站关键词优化怎么弄
  • 做网站的电话号码免费关键词挖掘网站
  • 厦门做网站公司有哪些seo是什么意思网络用语
  • 举报网站平台怎么举报手机百度搜索app
  • 鞍山网站制作濮阳网站推广
  • 专门做毕业设计的网站关键词排名提高
  • 制作简易网站新手怎么做seo优化
  • html网页设计毕业设计廊坊百度关键词优化
  • 怎么做商业网站模板免费模板
  • 贵阳58同城做网站公司有哪些抖音搜索seo
  • 企业推广方式优选隐迅推鹤壁搜索引擎优化
  • 为什么做网站的会弄友情链接详细的营销推广方案
  • 济南市建设局网站查房产信息关键词优化外包服务
  • 重庆网站制作的网站seo词条
  • 专业模板网站制作价格seo优化关键词分类
  • 宿迁市住房和城乡建设局网站软文推广营销平台
  • 网站建设 模块如何做外贸网站的推广
  • 云服务器免费试用厦门关键词seo排名网站
  • 网站推广只能使用在线手段进行seo网站平台
  • Dw怎么做网站往里面加标题和字疫情放开死亡人数最新消息
  • 怎么做hs网站百度云登录首页
  • 黄石市城市建设档案馆网站百度免费推广怎么做
  • iis如何做同时运行两个网站80端口提高工作效率8个方法
  • 网络市场营销的概念seo点击软件
  • 日本饰品网站浙江短视频seo优化网站
  • office做网站的爱站网
  • 如何做类似优酷的视频网站黄山seo公司
  • u8无可用数据源上海网站seoseodian