教你无限白嫖高达40G显存的A100运行flux realism lora工作流

新一代的Flux大模型已经上线,它的效果远超MidJourney,创造力爆棚!然而,想要流畅运行Flux至少需要17G的显存,这对很多电脑用户来说是个不小的挑战。虽然网上有一些平台提供在线体验,但不是API收费过高,就是需要排队,体验感不够顺畅。那么,有没有办法让你免费、独享地畅玩Flux呢?今天我就来教大家无限白嫖高达40G显存的A100来运行带lora的flux工作流。


启智社区(CSDN: OpenI)是中国人工智能和开源软件领域的一个重要平台,致力于推动人工智能技术的发展和应用。该社区为科研人员、开发者和爱好者提供了一个开放的学习和交流环境,涵盖了人工智能、深度学习、机器学习、数据科学等多个技术领域。
启智社区可能提供一些免费的计算资源或竞赛平台,供研究人员和开发者使用。每天签到最少可获得5小时免费GPU时长,如果每一次机器运行时长不超过30分钟,就不计算时长。这也就意味着,我们可以在30分钟前提前关闭机器,然后再重新开启,只要每一次运行不超过30分钟,就可以达到无限白嫖,而且重新开启机器是没有任何门槛的。

首先注册启智社区
https://openi.pcl.ac.cn/user/sign_up?sharedUser=NewestAI AFF
(带aff)
注册登陆后点击左上角加号


点击创建云脑任务,任务类型选择调试项目,所属项目选新建项目,随便起个名字点下一步。

然后你会打开一个新的界面,在这里选择英伟达的GPU,资源规格建议32G的v100以及32G以上的A100。
接下来要挂载我们部署好的镜像,方便一会儿一键运行带真实lora的flux工作流。

在这里填写镜像地址,把这个镜像地址直接复制粘贴过去:192.168.242.22:443/default-workspace/2a72307689ae49758c80c896fffda0a1/image:flux-realism-lora
然后选择模型,在公开模型这里搜索flux,就是这个,选择他。

然后检查一下镜像名字有没有真正复制过去,接着点击新建任务。
(PS:有人反馈端口映射不好用,所以我又重写了一个镜像,这个镜像自带ngrok环境:
192.168.242.22:443/default-workspace/2a72307689ae49758c80c896fffda0a1/image:fluxngrok
把这个镜像填到选项里)
然后等待机器启动,直到可以调试为止,接着点击调试,打开jupyter界面,在这里开启一个终端,然后在终端里面输入bash run.sh,这样就启动ComfyUI了,但是需要等待一点时间,让他拷贝模型过来。
接下来点击左上角的加号,然后再打开一个新的终端,在新的终端输入ssh -R 80:localhost:8188 [email protected]
即可开启端口映射,然后复制给出的地址用浏览器访问,不喜欢用这个端口映射可以用ngrok版本的镜像,但是你需要在终端输入你的authtoken,可以去这个网站登录获取:ngrok - Online in One Line
在终端里面,保存token的格式是这样的:
ngrok config add-authtoken 你的authtoken
然后输入ngrok http 8188
即可开启端口映射访问ComfyUI

接下来进入到ComfyUI,点击左上角的文件夹,切换到realism工作流然后跑图。注意,第一次启动需要加载模型,所以需要等待两分钟才会出图,之后的每一次就不用再加载了。
如果这次教程有用,别忘了点赞转发关注,带你白嫖更多项目。
我的第二期教程:教你白嫖32G显存gpu免费运行最强开源文生视频模型CogVideo!
第三期:教你白嫖32g的显卡在线搭建ai数字人嘴唇同步工具video-retalking!

305 个赞

好贴,谢谢分享。

5 个赞

有点厉害 开始实践

5 个赞

要是有个定时关机脚本就完美了

6 个赞

正愁没地方运行flux呢,谢谢大佬

5 个赞

部署的镜像哪里找呢?

2 个赞

感谢分享这个教程。

2 个赞

你是说你的机器已经启动了,不知道在哪里找到吗,点击左上角的个人中心,然后点击云脑任务,就可以看到你刚才运行的gpu机器

1 个赞

注意这家是会封号的。 我之前拿来渲染 blender 被封了

5 个赞

要部署的镜像要选择那个 在平台推荐里面选哪个比较好

6 个赞

直接复制这条粘贴过去可以吗
192.168.242.22:443/default-workspace/2a72307689ae49758c80c896fffda0a1/image:flux-realism-lora
这是我创建的镜像,自带需要的环境

3 个赞

ok 我操作一下 感谢tieba13

3 个赞

你跟管理员他们说没?

1 个赞

没说。 这家太小气换别的平台。

2 个赞

感谢分享,试一试,注意要加aff标签哦, aff

3 个赞

A100 一直在waiting,是不是用的人太多了?

5 个赞

#aff添加#GPU移除

可能是,那就换v100,32g也带得动

1 个赞

感谢分享,好人一生平安

2 个赞

To see the GUI go to: http://127.0.0.1:8188
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/model-list.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/alter-list.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/github-stats.json
Exception in thread Thread-1 ():
Traceback (most recent call last):
File “/opt/conda/lib/python3.10/site-packages/aiohttp/connector.py”, line 1173, in _create_direct_connection
hosts = await asyncio.shield(host_resolved)
File “/opt/conda/lib/python3.10/site-packages/aiohttp/connector.py”, line 884, in _resolve_host
addrs = await self._resolver.resolve(host, port, family=self._family)
File “/opt/conda/lib/python3.10/site-packages/aiohttp/resolver.py”, line 33, in resolve
infos = await self._loop.getaddrinfo(
File “/opt/conda/lib/python3.10/asyncio/base_events.py”, line 863, in getaddrinfo
return await self.run_in_executor(
File “/opt/conda/lib/python3.10/concurrent/futures/thread.py”, line 58, in run
result = self.fn(*self.args, **self.kwargs)
File “/opt/conda/lib/python3.10/socket.py”, line 955, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/opt/conda/lib/python3.10/threading.py”, line 1016, in _bootstrap_inner
self.run()
File “/opt/conda/lib/python3.10/threading.py”, line 953, in run
self._target(*self._args, **self._kwargs)
File “/ComfyUI/custom_nodes/ComfyUI-Manager/glob/manager_server.py”, line 1710, in
threading.Thread(target=lambda: asyncio.run(default_cache_update())).start()
File “/opt/conda/lib/python3.10/asyncio/runners.py”, line 44, in run
return loop.run_until_complete(main)
File “/opt/conda/lib/python3.10/asyncio/base_events.py”, line 649, in run_until_complete
return future.result()
File “/ComfyUI/custom_nodes/ComfyUI-Manager/glob/manager_server.py”, line 1707, in default_cache_update
await asyncio.gather(a, b, c, d, e)
File “/ComfyUI/custom_nodes/ComfyUI-Manager/glob/manager_server.py”, line 1694, in get_cache
json_obj = await core.get_data(uri, True)
File “/ComfyUI/custom_nodes/ComfyUI-Manager/glob/manager_core.py”, line 606, in get_data
async with session.get(uri) as resp:
File “/opt/conda/lib/python3.10/site-packages/aiohttp/client.py”, line 1194, in aenter
self._resp = await self._coro
File “/opt/conda/lib/python3.10/site-packages/aiohttp/client.py”, line 578, in _request
conn = await self._connector.connect(
File “/opt/conda/lib/python3.10/site-packages/aiohttp/connector.py”, line 544, in connect
proto = await self._create_connection(req, traces, timeout)
File “/opt/conda/lib/python3.10/site-packages/aiohttp/connector.py”, line 911, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File “/opt/conda/lib/python3.10/site-packages/aiohttp/connector.py”, line 1187, in _create_direct_connection
raise ClientConnectorError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host raw.githubusercontent.com:443 ssl:default [Temporary failure in name resolution]

1 个赞