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

【深度学习】fooocusapi,docker,inpainting图像

基础镜像制作来源

fooocusapi接口官方写的:

docker run -d --gpus=all \-e NVIDIA_DRIVER_CAPABILITIES=compute,utility \-e NVIDIA_VISIBLE_DEVICES=all \-p 8888:8888 konieshadow/fooocus-api

会下载一些模型,下载完后推这个镜像

docker commit 4dfd19dd1dc7 kevinchina/deeplearning:fooocusapi-office-v1

写个dockerfile:

FROM kevinchina/deeplearning:fooocusapi-office-v1
EXPOSE 7860
CMD ["python", "main.py", "--host", "0.0.0.0", "--port", "7860", "--skip-pip"]

构建一个新的镜像:

docker build -f Dockerfile . -t kevinchina/deeplearning:fooocusapi-office-v2
docker run -d --gpus=all -p 8881:7860 kevinchina/deeplearning:fooocusapi-office-v2

inpaint还需要下载一些东西,然年成为:

kevinchina/deeplearning:fooocusapi-office-v3

开启镜像

开启方式:

docker run --gpus device=0 -p 7881:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
docker run --gpus device=0 -p 7882:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
docker run --gpus device=1 -p 7883:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
docker run --gpus device=1 -p 7884:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
docker run --gpus device=1 -p 7885:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
docker run --gpus device=2 -p 7886:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
docker run --gpus device=2 -p 7887:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
docker run --gpus device=2 -p 7888:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
docker run --gpus device=3 -p 7889:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
docker run --gpus device=3 -p 7890:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
docker run --gpus device=3 -p 7891:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
docker run --gpus device=3 -p 7892:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
docker run --gpus device=0 -p 8550:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
docker run --gpus device=0 -p 8551:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
docker run --gpus device=1 -p 8552:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
docker run --gpus device=1 -p 8553:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3

多进程请求inpaint:

import base64
import io
import os
import traceback
from multiprocessing import Manager, Poolimport requests
import cv2
import numpy as np
import json
from PIL import Image
from PIL import ImageDraw
import numpy as np
import cv2
import pyclipper
from shapely.geometry import Polygon
# plt显示图
import matplotlib.pyplot as plt
from tqdm import tqdm
import jsondef expand_polygon_pyclipper(polygon, expand_ratio):polygon_shape = Polygon(polygon)distance = (polygon_shape.area * (np.power(expand_ratio, 2) - 1) / polygon_shape.length)subject = [tuple(l) for l in polygon]padding = pyclipper.PyclipperOffset()padding.AddPath(subject, pyclipper.JT_ROUND, pyclipper.ET_CLOSEDPOLYGON)expanded = padding.Execute(distance)if expanded == []:expanded = np.array(expanded)else:expanded = np.array(expanded[0]).reshape(-1, 2)return expandeddef shrink_polygon_pyclipper(polygon, expand_ratio):polygon_shape = Polygon(polygon)distance = (polygon_shape.area * (np.power(expand_ratio, 2) - 1) / polygon_shape.length)subject = [tuple(l) for l in polygon]padding = pyclipper.PyclipperOffset()padding.AddPath(subject, pyclipper.JT_ROUND, pyclipper.ET_CLOSEDPOLYGON)expanded = padding.Execute(-distance)if expanded == []:expanded = np.array(expanded)else:expanded = np.array(expanded[0]).reshape(-1, 2)return expanded# 定义函数
def func(x):return 0.25 * (np.sin(x - np.pi / 2) + 1)# 生成0到pi的10个均匀分布的点
x_values = np.linspace(0, np.pi, 11)[1:][::-1]
y_values = func(x_values) + 1
# print(f"面积{len(y_values)}", y_values)
x_values = np.linspace(0, np.pi, 13)[1:]
weight_inpaint = func(x_values) * 2def draw_heatmap(image, polygons):# 计算函数值并加上1# 搞个和image一样大的二维矩阵inpaint_image_weights = np.zeros(image.shape[:2], dtype=np.float32)for i in range(10):for polygon in polygons:expanded_polygon = expand_polygon_pyclipper(polygon, y_values[i])if expanded_polygon.size > 0:cv2.fillPoly(inpaint_image_weights, [expanded_polygon.astype(np.int32)], weight_inpaint[i])# 收缩0.95区域用白色填充for polygon in polygons:for indx, shk in enumerate([0.99, 0.98]):expanded_polygon = shrink_polygon_pyclipper(polygon, shk)if expanded_polygon.size > 0:cv2.fillPoly(inpaint_image_weights, [expanded_polygon.astype(np.int32)], weight_inpaint[10 + indx])return inpaint_image_weightsdef listPathAllfiles(dirname):result = []for maindir, subdir, file_name_list in os.walk(dirname):for filename in file_name_list:apath = os.path.join(maindir, filename)result.append(apath)return resultdef batch_process(index1, src_image_file, urls):url = urls[index1 % len(urls)]ocr_ret_file = src_image_file.replace(".jpg", ".json")txt_file = src_image_file.replace(".jpg", ".txt")output_image_file = src_image_file.replace(src, save_img_dst_output_image_file)output_image_file_alpha = src_image_file.replace(src, save_img_dst_output_inpaint_alpha)if not os.path.exists(ocr_ret_file):returnif not os.path.exists(txt_file):returnif os.path.exists(output_image_file_alpha):returnoutput_image_file_father = os.path.dirname(output_image_file)os.makedirs(output_image_file_father, exist_ok=True)output_image_file_alpha_father = os.path.dirname(output_image_file_alpha)os.makedirs(output_image_file_alpha_father, exist_ok=True)prompt = open(txt_file, "r", encoding="utf-8").read()if len(prompt) < 7:prompt = "a people"# 造一个mask图片在本地mask_file = "tmp_inpaint_mask.jpg"ocr_json_data = json.load(open(ocr_ret_file, "r", encoding="utf-8"))image = cv2.imread(src_image_file)mask = np.zeros(image.shape, dtype=np.uint8)for item in ocr_json_data:box = item[0]cv2.fillPoly(mask, np.array([box], dtype=np.int32), (255, 255, 255))# cv2.imwrite(mask_file, mask)src_image_file_rb = cv2.imencode('.jpg', image)[1].tobytes()mask_file_rb = cv2.imencode('.jpg', mask)[1].tobytes()# 构建请求的 multipart/form-data 数据files = {'input_image': ('src.jpg', src_image_file_rb, 'image/jpeg'),'input_mask': ('mask.jpg', mask_file_rb, 'image/jpeg')}data = {'prompt': prompt,'negative_prompt': 'big nose, watermark, signature, label, worst quality, low quality, normal quality, lowres, watermark, monochrome, grayscale, ugly, blurry, Tan skin, dark skin, black skin, skin spots, skin blemishes, age spot, glans, disabled, distorted, bad anatomy, morbid, malformation, amputation, bad proportions, twins, missing body, fused body, extra head, poorly drawn face, bad eyes, deformed eye, unclear eyes, cross-eyed, long neck, malformed limbs, extra limbs, extra arms, missing arms, bad tongue, strange fingers, mutated hands, missing hands, poorly drawn hands, extra hands, fused hands, connected hand, bad hands, wrong fingers, missing fingers, extra fingers, 4 fingers, 3 fingers, deformed hands, extra legs, bad legs, many legs, more than two legs, bad feet, wrong feet, extra feets, Negro, black people, black race','sharpness': '10','guidance_scale': '5','outpaint_distance_right': '0','loras': '[{"enabled":true,"model_name":"sd_xl_offset_example-lora_1.0.safetensors","weight":0.1}]','outpaint_distance_left': '0','outpaint_distance_bottom': '0','image_number': '1','negative_prompt': 'bad','refiner_switch': '0.5','base_model_name': 'juggernautXL_v8Rundiffusion.safetensors','image_seed': '-1','style_selections': ['Fooocus V2', 'Fooocus Enhance', 'Fooocus Sharp'],'inpaint_additional_prompt': '','outpaint_selections': '','refiner_model_name': 'None','aspect_ratios_selection': '1024*1024','performance_selection': 'Speed','require_base64': True,'async_process': False,}headers = {'accept': 'application/json'}try:if len(ocr_json_data) > 0:response = requests.post(url, files=files, data=data, headers=headers)postres = response.json()b64 = postres[0]["base64"]# 将base64字符串解码并保存为图像文件imgdata = base64.b64decode(b64)with open(output_image_file, 'wb') as f:f.write(imgdata)# print(f"Output image saved as {output_image_file}")# pillow讲b64直接转为imageimage_inpaint = Image.open(io.BytesIO(imgdata)).convert('RGB')image_inpaint_cv2 = np.array(image_inpaint)image_inpaint_cv2 = cv2.cvtColor(image_inpaint_cv2, cv2.COLOR_RGB2BGR)# 和原图进行alpha混合text_polys = []for item in ocr_json_data:box = item[0]text_polys.append(np.array(box))alpha = draw_heatmap(image, text_polys)inpaint_image_weights = alpha[:, :, np.newaxis]# print(inpaint_image_weights.shape)new_image = image_inpaint_cv2 * inpaint_image_weights + image * (1 - inpaint_image_weights)cv2.imwrite(output_image_file_alpha, new_image)else:# 直接写入cv2.imwrite(output_image_file_alpha, image)except:print(ocr_ret_file)if __name__ == '__main__':src = r"/ssd/xiedong/xiezhenceshi/xiezhen_datasets"save_img_dst_output_image_file = r"/ssd/xiedong/xiezhenceshi/inpaint_output_image_file"save_img_dst_output_inpaint_alpha = r"/ssd/xiedong/xiezhenceshi/inpaint_alpha2"os.makedirs(save_img_dst_output_image_file, exist_ok=True)os.makedirs(save_img_dst_output_inpaint_alpha, exist_ok=True)files = listPathAllfiles(src)files.sort()files = [file for file in files if file.endswith(".jpg")][5304:]tasks = list(enumerate(files))urlname = 'http://10.136.19.26:port/v1/generation/image-inpaint-outpaint'urlsx = []for i in range(7881, 7893):urlsx.append(urlname.replace("port", str(i)))for i in range(8550, 8554):urlsx.append(urlname.replace("port", str(i)))# 去掉7889urlsx.remove('http://10.136.19.26:7889/v1/generation/image-inpaint-outpaint')for i in urlsx:print(i)with Manager() as manager:lock = manager.Lock()with Pool(processes=len(urlsx)) as pool:# 传递 lock 到 process_user_prompt 函数pool.starmap(batch_process,[(index, file, urlsx) for index, file in tasks])# docker run --gpus device=0 -p 7881:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
# docker run --gpus device=0 -p 7882:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
# docker run --gpus device=1 -p 7883:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
# docker run --gpus device=1 -p 7884:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
# docker run --gpus device=1 -p 7885:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
# docker run --gpus device=2 -p 7886:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
# docker run --gpus device=2 -p 7887:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
# docker run --gpus device=2 -p 7888:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
# docker run --gpus device=3 -p 7889:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
# docker run --gpus device=3 -p 7890:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
# docker run --gpus device=3 -p 7891:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
# docker run --gpus device=3 -p 7892:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
# docker run --gpus device=0 -p 8550:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
# docker run --gpus device=0 -p 8551:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
# docker run --gpus device=1 -p 8552:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3
# docker run --gpus device=1 -p 8553:7860 -d  kevinchina/deeplearning:fooocusapi-office-v3

相关文章:

【深度学习】fooocusapi,docker,inpainting图像

基础镜像制作来源 fooocusapi接口官方写的&#xff1a; docker run -d --gpusall \-e NVIDIA_DRIVER_CAPABILITIEScompute,utility \-e NVIDIA_VISIBLE_DEVICESall \-p 8888:8888 konieshadow/fooocus-api会下载一些模型&#xff0c;下载完后推这个镜像 docker commit 4dfd1…...

算法017:二分查找

二分查找. - 备战技术面试&#xff1f;力扣提供海量技术面试资源&#xff0c;帮助你高效提升编程技能,轻松拿下世界 IT 名企 Dream Offer。https://leetcode.cn/problems/binary-search/ 二分查找&#xff0c;其实是双指针的一种特殊情况&#xff0c;但是时间复杂度极低&#…...

谷粒商城实战笔记-37-前端基础-Vue-基本语法插件安装

文章目录 一&#xff0c;v-model1&#xff0c;双向绑定2&#xff0c;vue的双向绑定2.1 html元素上使用指令v-model2.2 model中声明对应属性2.3&#xff0c;验证view绑定modelmodel绑定view 完整代码 二&#xff0c;v-on1&#xff0c;指令简介2&#xff0c;在button按钮中添加v-…...

mybatis中的缓存(一级缓存、二级缓存)

文章目录 前言一、MyBatis 缓存概述二、一级缓存1_初识一级缓存2_一级缓存命中原则1_StatementId相同2_查询参数相同3_分页参数相同4_sql 语句5_环境 3_一级缓存的生命周期1_缓存的产生2_缓存的销毁3_网传的一些谣言 4_一级缓存核心源码5_总结 三、二级缓存1_开启二级缓存2_二级…...

实现自动化采购:食堂采购系统源码开发详解

本篇文章&#xff0c;笔者将详细介绍食堂采购系统的开发过程&#xff0c;从需求分析、系统设计到实现和测试&#xff0c;为您全面解析如何构建一个高效的自动化采购系统。 一、需求分析 1.采购计划管理 2.供应商管理 3.订单管理 4.库存管理 5.财务管理 6.数据分析与报告 …...

linux、windows、macos清空本地DNS缓存

文章目录 Linux&#xff1a;Windows&#xff1a;macOS&#xff1a; Linux&#xff1a; 对于使用systemd的操作系统&#xff08;如CentOS 7、Ubuntu 16.04&#xff09;&#xff0c;可以使用以下命令重启systemd-resolved服务来清除缓存&#xff1a; sudo systemctl restart sys…...

领夹麦克风哪个品牌好,电脑麦克风哪个品牌好,热门麦克风推荐

​在信息快速传播的时代&#xff0c;直播和视频创作成为了表达与交流的重要方式。对于追求卓越声音品质的创作者而言&#xff0c;一款性能卓越的无线麦克风宛如一把利剑。接下来&#xff0c;我要为大家介绍几款备受好评的无线麦克风&#xff0c;这些都是我在实际使用中体验良好…...

【第5章】Spring Cloud之Nacos服务注册和服务发现

文章目录 前言一、提供者1. 引入依赖2.配置 Nacos Server 地址3. 开启服务注册 二、消费者1. 引入依赖2.配置 Nacos Server 地址3. 开启服务注册 三、服务列表四、服务发现1. 获取服务列表2. 测试2.1 获取所有服务2.2 根据服务名获取服务信息 五、更多配置项总结 前言 本节通过…...

Springboot 启动时Bean的创建与注入(一)-面试热点-springboot源码解读-xunznux

Springboot 启动时Bean的创建与注入&#xff0c;以及对应的源码解读 文章目录 Springboot 启动时Bean的创建与注入&#xff0c;以及对应的源码解读构建Web项目流程图&#xff1a;堆栈信息&#xff1a;堆栈信息简介堆栈信息源码详解1、main:10, DemoApplication (com.xun.demo)2…...

单调栈(随缘复习到了,顺手刷了)

也是不知道为什么突然又复习到单调栈了&#xff0c;所以顺手刷了三道题&#xff0c;总结一下 P6503 [COCI2010-2011#3] DIFERENCIJA 思路&#xff1a;这题是要求每个子区间里面的最大值和最小值的差&#xff0c;我们一开始想的必然是纯暴力呀&#xff0c;但是一看这数据&#…...

学习测试10-3自动化 web自动化

web自动化 chrome驱动下载地址&#xff1a; https://registry.npmmirror.com/binary.html?pathchromedriver/ https://googlechromelabs.github.io/chrome-for-testing/#stable观察Google版本&#xff0c;下相应的驱动 运行代码试试&#xff0c;成功Google就会弹出 from se…...

安防视频监控EasyCVR视频汇聚平台修改配置后无法启动的原因排查与解决

安防视频监控/视频集中存储/云存储/磁盘阵列EasyCVR平台基于云边端一体化架构&#xff0c;兼容性强、支持多协议接入&#xff0c;包括国标GB/T 28181协议、部标JT808、GA/T 1400协议、RTMP、RTSP/Onvif协议、海康Ehome、海康SDK、大华SDK、华为SDK、宇视SDK、乐橙SDK、萤石云SD…...

爬虫学习2:爬虫爬取网页的信息与图片的方法

爬虫爬取网页的信息与图片的方法 爬取人物信息 import requestshead {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0" } # 这是get请求带参数的模式…...

MySQL定时备份数据,并上传到oss

1.环境准备 1.安装阿里云的ossutil 2.安装mysql 2.编写脚本 脚本内容如下 #!/bin/bash # 数据库的配置信息&#xff0c;根据自己的情况进行填写 db_hostlocalhost db_usernameroot db_passwordroot db_namedb_root # oss 存贮数据的bucket地址 bucket_namerbsy-backup-buck…...

极速删除 node_modules 仅3 秒()

今天教大家如何快速删除 node_modules 依赖的一个小秘诀&#xff0c;告别繁琐&#xff01;&#xff01;&#xff01; 前言 作为前端开发者&#xff0c;相信大家都曾经历过删除 node_modules 文件夹时的漫长等待。 尤其是在处理那些依赖库繁多的项目时&#xff0c;删除操作…...

vue this.$refs 动态拼接

业务需要&#xff0c;refs是不固定的 <vxe-grid refgridWarehouse v-bind"gridWarehouseOptions" v-if"tableHeight" :height"tableHeight":expand-config"{iconOpen: vxe-icon-square-minus, iconClose: vxe-icon-square-plus}"c…...

一次搞定!中级软件设计师备考通关秘籍

大家好&#xff0c;我是小欧&#xff01; 今天我们来聊聊软考这个话题。要是你准备参加计算机技术与软件专业技术资格&#xff08;软考&#xff09;&#xff0c;那么这篇文章就是为你量身定做的。话不多说&#xff0c;咱们直接进入正题。 什么是软考&#xff1f; 软考&#xf…...

第十六讲 python中的序列-列表简介-特点-常用方法-创建-添加-删除-访问-切片-排序-复制-反转

目录 1. 序列的本质和内存结构 2.列表 2.1 列表简介 2.2 列表的特点 2.3 列表对象的常用方法大全: 2.4 列表的创建 2.4.1 使用方括号 [] 2.4.2 使用 list() 函数 2.4.3 使用 range() 函数 2.4.3.1 range的基本用法 2.4.3.2 返回值 2.4.3.3 range的使用例子 2.4.3.4 range的使…...

大模型日报 2024-07-22

大模型日报 2024-07-22 大模型资讯 谷歌将在ICML 2024展示机器学习研究成果 摘要: 谷歌研究人员将在ICML 2024会议上展示他们在机器学习领域的探索&#xff0c;从理论到应用&#xff0c;构建解决深层问题的ML系统。 代理符号学习&#xff1a;优化AI系统符号组件的框架 摘要: 大…...

Electron 的open-file事件

在 Electron 中,open-file 事件是一个重要的事件,它允许开发者在应用程序已经运行的情况下,通过文件打开请求(如双击文件或在命令行中使用 open 命令打开文件)来捕获文件路径。以下是对 open-file 事件的详细解析: 触发条件 应用已经打开。用户通过双击与应用程序关联的…...

突破百度网盘限速:从问题诊断到性能优化的实战全攻略

突破百度网盘限速&#xff1a;从问题诊断到性能优化的实战全攻略 【免费下载链接】baidu-wangpan-parse 获取百度网盘分享文件的下载地址 项目地址: https://gitcode.com/gh_mirrors/ba/baidu-wangpan-parse 问题诊断&#xff1a;揭开网盘下载的痛点图谱 场景引入&…...

基于 Kinova Gen3 机械臂的家庭人机交互安全算法研究

随着服务机器人逐步进入家庭场景&#xff0c;人机交互&#xff08;HRI&#xff09;的安全性成为影响机器人普及的关键因素。相较于工业环境&#xff0c;家庭空间布局多变、人员活动随机&#xff0c;对机械臂的感知、规划与控制提出了更高要求。本文以7自由度Kinova Gen3机械臂为…...

nli-distilroberta-base在工业质检文档中的应用:SOP操作步骤与现场记录逻辑一致性核查

nli-distilroberta-base在工业质检文档中的应用&#xff1a;SOP操作步骤与现场记录逻辑一致性核查 1. 项目背景与价值 在工业制造领域&#xff0c;标准作业程序(SOP)与现场操作记录的一致性核查是质量管理的核心环节。传统人工核查方式存在效率低、主观性强、覆盖不全等问题。…...

Qwen3-0.6B-FP8代理能力展示:调用计算器、查天气、解析PDF的Chainlit实录

Qwen3-0.6B-FP8代理能力展示&#xff1a;调用计算器、查天气、解析PDF的Chainlit实录 1. 引言&#xff1a;当小模型遇上大智慧 你可能听过很多关于大语言模型的讨论&#xff0c;动辄几十亿、上百亿参数&#xff0c;感觉它们无所不能。但今天我想和你聊聊一个不太一样的模型—…...

Python无GIL时代来了?揭秘CPython 3.13+无锁并发模型的8个高频面试陷阱

第一章&#xff1a;Python无GIL时代的技术演进与核心变革Python长期以来受全局解释器锁&#xff08;GIL&#xff09;制约&#xff0c;在多核CPU场景下难以实现真正的并行计算。随着CPython 3.13正式引入实验性“自由线程模式”&#xff08;Free-threading Mode&#xff09;&…...

OpenClaw异常处理:配置nanobot自动重试失败任务

OpenClaw异常处理&#xff1a;配置nanobot自动重试失败任务 1. 为什么需要自动重试机制 上周我让OpenClaw执行一个简单的夜间数据收集任务时&#xff0c;遇到了一个令人头疼的问题。凌晨3点&#xff0c;网络突然波动导致任务中断&#xff0c;而当我早上打开电脑时&#xff0c…...

Windows系统卡顿?一招禁用Microsoft Compatibility Telemetry释放CPU资源(附详细截图)

Windows系统卡顿终极解决方案&#xff1a;彻底禁用Microsoft Compatibility Telemetry 最近帮朋友处理一台老笔记本时&#xff0c;遇到了典型的Windows系统卡顿问题——风扇狂转、程序响应迟缓&#xff0c;任务管理器里一个叫"Microsoft Compatibility Telemetry"的进…...

小白友好!Gemma-3-12B-IT WebUI部署常见错误及修复方法

小白友好&#xff01;Gemma-3-12B-IT WebUI部署常见错误及修复方法 1. 为什么你的WebUI总是打不开&#xff1f; 你是不是也遇到过这种情况&#xff1a;跟着教程一步步部署Gemma-3-12B-IT的WebUI&#xff0c;最后一步打开浏览器&#xff0c;输入地址&#xff0c;结果页面一直转…...

避坑指南:HuggingFace本地数据集加载常见的5个报错及解决方法

HuggingFace本地数据集加载实战&#xff1a;5类典型报错深度解析与解决方案 当你第一次尝试将本地数据集加载到HuggingFace生态系统中时&#xff0c;可能会遇到各种令人困惑的错误信息。这些报错往往隐藏着数据格式、特征定义或路径处理等关键问题。本文将剖析开发者最常遇到的…...

程序员转行学习 AI 大模型: 提示词工程 | 附精选学习资料

本文是程序员转行学习AI大模型的第12个核心知识点笔记&#xff0c;笔记后附精选的提示词工程学习资料。 当前阶段&#xff1a;还在学习知识点&#xff0c;由点及面&#xff0c;从 0 到 1 搭建 AI 大模型知识体系中。 系列更新&#xff0c;关注我&#xff0c;后续会持续记录分享…...