main
黄海 1 year ago
parent 24cf32d84c
commit 314c9d31ea

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Before

Width:  |  Height:  |  Size: 2.3 MiB

After

Width:  |  Height:  |  Size: 2.3 MiB

Before

Width:  |  Height:  |  Size: 2.2 MiB

After

Width:  |  Height:  |  Size: 2.2 MiB

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Before

Width:  |  Height:  |  Size: 2.9 MiB

After

Width:  |  Height:  |  Size: 2.9 MiB

Before

Width:  |  Height:  |  Size: 2.9 MiB

After

Width:  |  Height:  |  Size: 2.9 MiB

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Before

Width:  |  Height:  |  Size: 2.2 MiB

After

Width:  |  Height:  |  Size: 2.2 MiB

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 976 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 452 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 913 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 682 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 682 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

@ -1,38 +0,0 @@
import json
# 假设你的 JSON 文件路径是 'data.json'
file_path = '../JSON/16.json'
# 读取 JSON 文件
with open(file_path, 'r', encoding='utf-8') as file:
modelData = json.load(file)
# 递归函数,用于遍历 JSON 对象
def find_and_print_path(obj, target_value, path=""):
if isinstance(obj, dict):
for key, value in obj.items():
# 构建当前属性的完整路径
current_path = f"{path}/{key}" if path else key
# 如果当前值是字典或列表,继续递归遍历
if isinstance(value, (dict, list)):
find_and_print_path(value, target_value, current_path)
# 如果当前值是字符串,并且与目标值匹配,打印路径
elif isinstance(value, str) and value == target_value:
print(f"Found1 at: {current_path}")
elif isinstance(obj, list):
for index, item in enumerate(obj):
# 构建当前属性的完整路径
current_path = f"{path}/{index}" if path else str(index)
# 如果当前元素是字典或列表,继续递归遍历
if isinstance(item, (dict, list)):
find_and_print_path(item, target_value, current_path)
# 如果当前元素是字符串,并且与目标值匹配,打印路径
elif isinstance(item, str) and item == target_value:
print(f"Found2 at: {current_path}")
if __name__ == '__main__':
path_str=''
# 调用函数并传入 JSON 数据和目标值
img_name = "819ed9ad42992cabe0c17023ba4a58b1 (3).jpg"
find_and_print_path(modelData, img_name)

@ -1,22 +0,0 @@
import oss2
# pip install oss2
# 填写RAM用户的访问密钥AccessKey ID和AccessKey Secret
accessKeyId = 'LTAI5tE4tgpGcKWhbZg6C4bh'
accessKeySecret = 'oizcTOZ8izbGUouboC00RcmGE8vBQ1'
# endpoint填写Bucket所在地域对应的Endpoint。以华东1杭州为例Endpoint填写为https://oss-cn-hangzhou.aliyuncs.com。
endpoint = 'http://oss-cn-beijing.aliyuncs.com'
# 填写Bucket名称。
bucketName = 'hzkc'
def uploadOss(key,localFile):
# 使用代码嵌入的RAM用户的访问密钥配置访问凭证。
auth = oss2.Auth(accessKeyId, accessKeySecret)
bucket = oss2.Bucket(auth, endpoint, bucketName)
# 上传文件到OSS。
# 设置上传时的元数据指定Content-Type
headers = {'Content-Type': 'image/png', "Content-Disposition": 'inline'}
bucket.put_object_from_file(key, localFile, headers)

@ -1,33 +0,0 @@
from Util.PgUtil import *
# 系统用户ID
SYSTEM_USER_ID = '16380C30-B1EA-4BFF-B5E6-4F3928CE36F3'
# 普通用户ID
NORMAL_USER_ID = 'ca3e280e-12f0-33ff-c92e-4d56724b0fa1'
USERS = [SYSTEM_USER_ID, NORMAL_USER_ID]
for USER in USERS:
# 当前处理哪个用户的文件
user_id = USER
# 获取所有生成的文件获取到task_id然后修改task_id
sql = "select t1.id,t1.task_id,t2.model_id from t_hy_task_files as t1 inner join t_hy_task as t2 on t1.task_id=t2.task_id where t2.user_id='%s'" % (
user_id)
results = execute_query(sql)
for row in results:
# 获取这个model_id+这个用户最小的任务编号是多少,然后把当前的数据修改为那个任务编号
sql = "select task_id from t_hy_task where model_id=%s and user_id='%s' limit 1" % (row[2], user_id)
res = execute_query(sql)
if res:
task_id = res[0][0]
sql = "update t_hy_task_files set task_id=%s where id=%s" % (task_id, row[0])
execute_modify(sql)
print("成功修改了一个数据")
# 删除表中没有生成过文件的任务
sql = "delete from t_hy_task where task_id not in (select task_id from t_hy_task_files)"
execute_modify(sql)
# 清理完毕
print("清理完毕")

@ -72,7 +72,7 @@ if __name__ == '__main__':
else:
replace_content = '1 girl'
runComfyUI(json_file='../JSON/16.json',
runComfyUI(json_file='../JSON/16/16.json',
model_id=16,
task_type_code='User',
input_image=fi,

@ -5,11 +5,11 @@ image_path = r"D:\KeCheng\BaiHu\Out\Images\User\16\b90bb411-9d81-4a46-9774-bc41f
im = Image.open(image_path)
draw = ImageDraw.Draw(im)
width, height = im.size
text = "绘鸭"
text = "vx:绘智AI"
# 设置字体、字体大小等等
font = ImageFont.truetype(font='msyh.ttc', size=33) # 微软雅黑
# 添加水印
draw.text((width-100, height-100), text, font=font)
draw.text((width-200, height-100), text, font=font)
im.show()
im.close()
# 保存图片

@ -1,62 +0,0 @@
### 零、API网站
https://goapi.gptnb.me/about
### 一、Midjourney 与垫图的人像相差太大,怎么解决?
### 二、MID_JOURNEY 与 NIJI_JOURNEY 有什么区别?
![](https://dsideal.obs.cn-north-1.myhuaweicloud.com/HuangHai/BlogImages/202405310913796.png)
![](https://dsideal.obs.cn-north-1.myhuaweicloud.com/HuangHai/BlogImages/202405310914077.png)
Midjourney迎来重大更新深度解析全新「角色一致性」命令
https://zhuanlan.zhihu.com/p/689039316
### 三、换脸的API没有测试通过怎么处理
[何必用PSMidjourney上新「换脸魔法」奥特曼一秒COS罗马将军](https://www.toutiao.com/article/7345382303868174867)
### 四、DomoAI,PIKA能否接入
### 五、一键MV的功能还需要测试稳定性还需要进一步加强
### 六、小程序开发还在继续,什么时间能够完成上线?
### 七、参考资料
MJ实验室
https://tieba.baidu.com/home/main/?id=tb.1.464ffc2f.okKFIn-02jv05DDBxNs7Vg&fr=frs
微信小程序对接阿里云OSS
https://blog.csdn.net/hongzhangzhao/article/details/80243768
# Midjourney表情包制作教程
https://www.bilibili.com/video/BV1XP411k7aQ/
```
Little girl in white robe, elegant Tang Dynasty poet, holding a long sword. four cute poses and expressions,smile, sad, angry, anticipation. different emotions, multiple poss and expressions, Chinese painting, Chibi,illustrations, flatcolors, simple line 2d painting, popular artstations, digital art, pixel style cartoons, lineworks, 8k --s 50 --niji 6
```
# Midjourney哭包表情制作教程
https://www.bilibili.com/video/BV15m4y1W7eE
```
Little girl in phoenix coronet and robes of rank, elegant Tang Dynasty. tears run down the cheeks, open mouth wide. four cute poses and expressions, bawl, sob, weep, tears. different emotions, poss and expressions, Chinese painting, Chibi, illustrations, flatcolors, simple line, 8k --s 50 --niji 6
```
# 如何用MJ实现照片的风格化/照片转绘/照片转插画/头像绘制?
# 1、使用工具Midjourney2、2种思路1、直接调用niji系的动漫风格2、或者通过提示词控制风格3
#### 用NIJI5控制
# https://www.douyin.com/video/7371041990676368649
https://cdn.discordapp.com/attachments/1245976516001796117/1245993992970047538/mote2.png?ex=665ac5d5&is=66597455&hm=1e99d7e53bb3d23c069d748621008918fbf64c46c2153ea9e490a67c5278ed74& A beautiful Chinese girl with long curly hair,front view --ar 2:3 --niji 5 --style cute --iw 2
https://cdn.discordapp.com/attachments/1245976516001796117/1245993992970047538/mote2.png?ex=665ac5d5&is=66597455&hm=1e99d7e53bb3d23c069d748621008918fbf64c46c2153ea9e490a67c5278ed74& A beautiful Chinese girl with long curly hair,front view,A water color oil painting,In the style of boticelli --ar 2:3 --niji 6 --iw 1.3
![](https://dsideal.obs.cn-north-1.myhuaweicloud.com/HuangHai/BlogImages/202405311548043.png)
### 结论
尽量用高清大图比如2MB以上的图片不要用不清晰的图片不要用不清晰的图片不要用不清晰的图片
https://cdn.discordapp.com/attachments/1245976516001796117/1246011948215304254/02277-3189626545-yiyi_lora_yiyi-v1.0-000004_0.5__Best_QualityMasterpiece_LevelUltra_High_Resolution1_girlExquisite_FaceDetailed_FaceDetai.png?ex=665ad68e&is=6659850e&hm=0019f53ab669f345e1b17c273f5ccc4878778a427e0ce49c383f8d9a9b642863& chinese red blouse, in the style of dreamy and romantic compositions, floral explosions --ar 24:37 --v 6
https://cdn.discordapp.com/attachments/1245976516001796117/1246011948215304254/02277-3189626545-yiyi_lora_yiyi-v1.0-000004_0.5__Best_QualityMasterpiece_LevelUltra_High_Resolution1_girlExquisite_FaceDetailed_FaceDetai.png?ex=665ad68e&is=6659850e&hm=0019f53ab669f345e1b17c273f5ccc4878778a427e0ce49c383f8d9a9b642863& a painting of a woman in red with black hair, in the style of delicate ink washes, epic fantasy scenes, chinese painting, splattered/dripped, white background, traditional costumes, soft focus lens --ar 73:98 --v 6
https://cdn.discordapp.com/attachments/1245976516001796117/1246011948215304254/02277-3189626545-yiyi_lora_yiyi-v1.0-000004_0.5__Best_QualityMasterpiece_LevelUltra_High_Resolution1_girlExquisite_FaceDetailed_FaceDetai.png?ex=665ad68e&is=6659850e&hm=0019f53ab669f345e1b17c273f5ccc4878778a427e0ce49c383f8d9a9b642863& Chinese swordsman, warrior girl, in the style of editorial illustrations, 32k uhd, monochromatic artworks, white and gray, detailed portraits, loish, fantastical --ar 24:31 --v 6
Loading…
Cancel
Save