- 博客(20)
- 收藏
- 关注
原创 “Prompt-to-Prompt Image Editing with Cross Attention Control ”代码分析(一)
交叉注意力可视化,文生图
2023-10-26 17:58:56
1472
5
原创 多重controlnet控制(使用huggingface提供的API)
以上设置都下载了相关权重文件,所以可以本地使用。在openpose处理部分需要修改源码才能实现本地部署,不然的话会连接huggingface官方,离线就不能运行了。该部分是用来处理人体姿态的,有很多其他的方法,也可以不使用他们huggingface提供的一个方法。这样就省了这个操作。huggingface相关diffusers等库的下载暂不提供,可以轻易找到。
2023-05-05 13:54:53
2051
原创 简易五子棋小游戏
#include<stdio.h>#include<stdio.h>#include<windows.h>#define N 20//N为棋盘大小int array[N][N];void display(int length){ for(int i=0;i<length;i++) for(int j=0;j<length;j++) { if (array[i][j]==0) .
2022-04-01 09:20:34
251
原创 链表的创建和插入
#include<stdio.h>#include<stdlib.h>typedef struct node{ int data; struct node *p;}*Node;//申明一个结构体,并申明一指针型结构体变量Nodeint main(){ Node head,tail;//头指针 head=(struct node *)malloc(sizeof(struct node)); head->p=NULL;//此时头.
2022-03-24 11:19:20
729
原创 小猫钓鱼-队列和栈的使用
《啊哈!算法》中的小猫钓鱼例题,结合C++提供的STL库实现要求。#include<stdio.h>#include<string.h>#include<queue>#include<stack>using namespace std;int main(){ queue <int> Ca;//猫的牌面 queue <int> Fi;//🐟的牌面 stack <int> Stk;//桌
2022-03-23 13:13:48
774
原创 快速排序(C语言)
#include<stdio.h>#include<time.h>void quick_Sort(int Array[],int left,int right){ int sentry,t;//sentry 哨兵 t中间变量 if(left>right) return; sentry=Array[left]; int i=left; int j=right; while(i!=j)//开始从两边往中间寻找 .
2022-03-23 11:14:21
609
原创 Dijkstral最短路径
使用邻接矩阵来记录图。图中各点的关系需要自己看下矩阵了。代码如下:#include<iostream>#include<stdio.h>#include<queue>#include<stdlib.h>#include<conio.h>#include<string.h>using namespace std;typedef struct note{int x;//城市标号int s;//换乘次数}No
2022-03-11 22:06:30
177
原创 C语言实现迷宫寻路(需要自己手动创造迷宫)
#include<stdio.h>#include<stdlib.h>#include<stack>#include<iostream>#include<windows.h>using namespace std;int M[17][17];int flag=0;typedef struct ZBZ{ /* data */ int X_dot; int Y_dot;}XY;stack<struct ZBZ&.
2022-03-11 21:54:40
1976
原创 基于linux的网络聊天室系统设计(C语言)
该系统采用多线程方式实现不同主机之间的通信。可实现多个用户间的通信以及可支持私聊模式。(输入用户名即可进入私聊模式,输入ALL返回群聊模式)某一客户端退出并不影响其他客户的使用,所有用户全部退出,服务器关闭端口,结束进程。服务器主线程程序框图服务器接收连接线程程序框图(不完全,代码后续更新了,没改框图)客户端主线程程序框图)客户端消息接发线程程序框图实验结果服务器端代码:#include <stdio.h>#include...
2022-03-11 21:30:00
10541
15
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人