|
import marimo |
|
|
|
__generated_with = "0.10.12" |
|
app = marimo.App() |
|
|
|
|
|
@app.cell |
|
def _(): |
|
import marimo as mo |
|
|
|
mo.md("# Ai for U") |
|
return (mo,) |
|
|
|
|
|
@app.cell(hide_code=True) |
|
def _(mo): |
|
mo.accordion( |
|
{ |
|
"联系我或加群交流:": mo.md( |
|
rf""" |
|
- [交流群](https://qr61.cn/oohivs/qRp62U6) |
|
- [Discord](https://discord.gg/3JWMgKQznF) |
|
""" |
|
) |
|
} |
|
) |
|
return |
|
|
|
|
|
@app.cell(hide_code=True) |
|
def _(mo): |
|
mo.md( |
|
""" |
|
### 【ai来事】 Aitools 一键安装说明 |
|
""" |
|
).callout() |
|
return |
|
|
|
|
|
@app.cell(hide_code=True) |
|
def _(mo): |
|
mo.md("""**安装前请阅读说明** 也可以参考视频教程进行。""") |
|
return |
|
|
|
|
|
@app.cell |
|
def _(mo, tips): |
|
mo.accordion(tips) |
|
return |
|
|
|
|
|
@app.cell(hide_code=True) |
|
def _(mo): |
|
mo.md("""## Finally, a fun fact""") |
|
return |
|
|
|
|
|
@app.cell |
|
def _(): |
|
tips = { |
|
"【SD webUI Forge一键安装脚本】": ( |
|
""" |
|
**Stable Diffusion WebUI Forge** |
|
|
|
- _最热门_ 的生图 webUI。除了SD还支持Flux,相对comfyui简单易用,功能也很强大。 |
|
- 使用前提条件:符合的算力平台(比如cloudstudio) |
|
- 购买获取到安装文件([获取链接](https://gf.bilibili.com/item/detail/1107362073))。 |
|
- 适合人群:小白及以上水平皆可一键安装。 |
|
|
|
- 如何 `一键安装`: |
|
- 图形界面方法:请查看 [视频教程](https://www.bilibili.com/video/BV1aUrXYLEB4/): |
|
```bash |
|
cd /workspace && deactivate && apt-get update && apt-get install -y curl; bash -c "$(curl -fsSL https://gitee.com/fuliai/ai2u/raw/main/ai2u.sh)" - sd-webui-forge-ics |
|
``` |
|
- 命令行: |
|
```bash |
|
cd /workspace && deactivate && apt-get update && apt-get install -y curl; bash -c "$(curl -fsSL https://gitee.com/fuliai/ai2u/raw/main/ai2u.sh)" - cli sd-webui-forge-ics |
|
``` |
|
- 如何启动程序 |
|
|
|
- 方式一(主要启动方式):命令行启动程序: |
|
```bash |
|
/workspace/apps/ksa/ksa_x64 |
|
cd /workspaces/ai_StableDifusion |
|
source .venv/bin/activate |
|
cd stable-diffusion-webui-forge |
|
export HF_ENDPOINT=https://hf-mirror.com |
|
./webui.sh -f |
|
``` |
|
- 方式二:图形界面启动程序: |
|
```bash |
|
source /workspaces/ai_StableDifusion/.venv/bin/activate |
|
/workspace/apps/ksa/ksa_x64 |
|
marimo run /workspaces/apps/stable-diffusion-webui-forge.py |
|
``` |
|
之后使用ksa连接,在浏览器中使用 10.0.0.1:<安装程序的端口号> 来访问安装页面,点击"启动程序", |
|
之后使用 10.0.0.1:<程序运行的端口号> 来访问ai程序。 |
|
""" |
|
), |
|
"【LATENT SYNC一键安装脚本】": ( |
|
""" |
|
**LATENT SYNC** |
|
|
|
- _最新热门_ 的唇形同步、数字人应用。 |
|
- 使用前提条件:符合的算力平台(比如cloudstudio) |
|
- 购买获取到安装文件([获取链接](https://gf.bilibili.com/item/detail/1107362073))。 |
|
- 适合人群:小白及以上水平皆可一键安装。 |
|
|
|
- 如何 `一键安装`: |
|
- 图形界面方法:请查看[视频教程](https://www.bilibili.com/video/BV1aUrXYLEB4/): |
|
```bash |
|
cd /workspace && deactivate && apt-get update && apt-get install -y curl; bash -c "$(curl -fsSL https://gitee.com/fuliai/ai2u/raw/main/ai2u.sh)" - latent-sync-ics |
|
``` |
|
- 命令行: |
|
```bash |
|
cd /workspace && deactivate && apt-get update && apt-get install -y curl; bash -c "$(curl -fsSL https://gitee.com/fuliai/ai2u/raw/main/ai2u.sh)" - cli latent-sync-ics |
|
``` |
|
- 如何启动程序 |
|
|
|
- 方式一(主要启动方式):命令行启动程序: |
|
```bash |
|
/workspace/apps/ksa/ksa_x64 |
|
cd /workspace/ai_latentsync |
|
source .venv/bin/activate |
|
cd LatentSync |
|
export HF_ENDPOINT=https://hf-mirror.com |
|
python gradio_app.py |
|
``` |
|
ksa连接后在浏览器中使用 10.0.0.1:7860 打开ai程序 |
|
|
|
- 方式二:图形界面启动程序: |
|
```bash |
|
source /workspace/ai_latentsync/.venv/bin/activate |
|
/workspace/apps/ksa/ksa_x64 |
|
marimo run /workspace/apps/latent-sycn-ics.py |
|
``` |
|
之后使用ksa连接,在浏览器中使用 10.0.0.1:8000 来访问安装页面,点击"启动程序", |
|
之后使用 10.0.0.1:8000 来访问ai程序。(以实际端口为准) |
|
""" |
|
), |
|
"【comfyUI一键安装脚本】": ( |
|
""" |
|
**comfyUI** |
|
|
|
- _最新热门_ 的AI绘画工具,现在还支持AI视频生成等强大功能。 |
|
- 使用前提条件:符合的算力平台(比如【腾讯云】[cloudstudio](https://ide.cloud.tencent.com/)) |
|
- 购买获取到安装文件([获取链接](https://gf.bilibili.com/item/detail/1107198073))。 |
|
- 适合人群:小白及以上水平皆可一键安装,直接使用,但需要根据自己的需要自行下载模型。comfyui具体使用需要自行学习摸索。 |
|
|
|
- ### 如何 `一键安装`: |
|
- 命令行(主要安装方式): |
|
```bash |
|
cd /workspace && deactivate && apt-get update && apt-get install -y curl; bash -c "$(curl -fsSL https://gitee.com/fuliai/ai2u/raw/main/ai2u.sh)" - cli comfyui-ics |
|
``` |
|
- 图形界面方法:请查看[视频教程](https://www.bilibili.com/video/BV13UBRYVEmX/): |
|
```bash |
|
cd /workspace && deactivate && apt-get update && apt-get install -y curl; bash -c "$(curl -fsSL https://gitee.com/fuliai/ai2u/raw/main/ai2u.sh)" - comfyui-ics |
|
``` |
|
- ### 如何启动程序 |
|
|
|
- 方式一(主要启动方式):命令行启动程序: |
|
```bash |
|
/workspace/apps/ksa/ksa_x64 |
|
cd ai_comfyui && source .venv/bin/activate && cd ComfyUI && export HF_ENDPOINT=https://hf-mirror.com && python main.py |
|
``` |
|
ksa连接后在浏览器中使用 10.0.0.1:8188 打开ai程序 |
|
|
|
- 方式二:图形界面启动程序: |
|
```bash |
|
source /workspace/ai_comfyui/.venv/bin/activate |
|
/workspace/apps/ksa/ksa_x64 |
|
marimo run /workspace/apps/comfyui-ics.py |
|
``` |
|
之后使用ksa连接,在浏览器中使用 10.0.0.1:8188 来访问安装页面,点击"启动程序", |
|
之后使用 10.0.0.1:8188 来访问ai程序。(以实际端口为准) |
|
ksa连接后在浏览器中使用 10.0.0.1:8188 打开ai程序 |
|
|
|
- ### 如何进行模型下载 |
|
|
|
- 视频中使用到的命令: |
|
aria2下载命令格式: |
|
``` |
|
aria2c -c -x 16 -s 16 -k 50M -o <保存的文件名> <实际下载地址> |
|
``` |
|
例子:魔搭平台模型下载命令 |
|
``` |
|
aria2c -c -x 16 -s 16 -k 50M -o flux1-dev-bnb-nf4-v2.safetensors https://modelscope.cn/models/livehouse/flux1-dev-bnb-nf4-v2/resolve/master/flux1-dev-bnb-nf4-v2.safetensors |
|
``` |
|
例子:hugging face 模型下载命令(视频中示范工作流需要的VAE模型) |
|
``` |
|
aria2c -c -x 16 -s 16 -k 50M -o ae.safetensors https://hf-mirror.com/camenduru/FLUX.1-dev/resolve/main/ae.safetensors |
|
``` |
|
例子:视频中示范工作流需要的chechpoint模型 |
|
``` |
|
aria2c -c -x 16 -s 16 -k 100M -o flux1-dev-fp8.safetensors https://modelscope.cn/models/livehouse/flux1-dev-fp8/resolve/master/flux1-dev-fp8.safetensors |
|
``` |
|
""" |
|
), |
|
"ksa虚拟网络": ( |
|
""" |
|
**ksa虚拟网络** |
|
|
|
- 软件:ksa 官网:[https://ksa.kanxue.com/](https://ksa.kanxue.com/) |
|
- 好用,速度快,安全,无流量限制 |
|
- 支持多平台,大家可以自行部署,也可以使用本一键安装脚本 |
|
- 适合人群:小白及以上水平皆可一键安装,直接使用 |
|
- 视频教程:[ksa视频教程](https://www.bilibili.com/video/BV1aUrXYLEB4/) |
|
|
|
- ### 如何 `一键安装`: |
|
```bash |
|
cd /workspace && deactivate && apt-get update && apt-get install -y curl |
|
mkdir apps && cd apps && wget https://hf-mirror.com/spaces/fuliai/ai2u/raw/main/ksa-ics.py |
|
bash -c "$(curl -fsSL https://gitee.com/fuliai/ai2u/raw/main/ai2u.sh)" - cli ksa-ics |
|
``` |
|
- ### 如何启动程序 |
|
|
|
- 命令行终端启动程序: |
|
```bash |
|
/workspace/apps/ksa/ksa_x64 |
|
``` |
|
ksa连接后在浏览器中使用【 10.0.0.1:程序实际端口 】来打开相应的ai程序 |
|
比如这里启动的ollama的端口是6399,那么就使用 10.0.0.1:6399 来使用ollama的API |
|
比如启动的comfyui的端口是8188,那么就使用 10.0.0.1:8188 来打开comfyui |
|
比如启动的latent-sync的端口是7860,那么就使用 10.0.0.1:7860 来打开latent-sync |
|
比如启动的sd-webui-forge的端口是8000,那么就使用 10.0.0.1:8000 来打开sd-webui-forge |
|
|
|
- ### ollama如何进行模型下载 |
|
``` |
|
ollama pull deepseek-r1:14b |
|
ollama pull huihui_ai/deepseek-r1-abliterated:14b |
|
``` |
|
""" |
|
|
|
), |
|
"其它": ( |
|
""" |
|
开发中…… |
|
""" |
|
), |
|
"脚本定制、模型下载、节点安装等": ( |
|
""" |
|
有需要可以联系我 |
|
""" |
|
), |
|
|
|
} |
|
return (tips,) |
|
|
|
|
|
if __name__ == "__main__": |
|
app.run() |