diff --git a/docs/compute/container.md b/docs/compute/container.md index 1513657aac3219ccc97c6b482edec35de8ce24c1..0d2429c5ae6a766123a802012a557073baedb9f4 100644 --- a/docs/compute/container.md +++ b/docs/compute/container.md @@ -217,7 +217,7 @@ SCP指令为:`scp -P 32222 root+vm-HNydbNJE2uLQfFkm@140.207.205.81:\data\moark ![步骤一](/img/computility/compu17.png) -SSH隧道代理指令:`ssh -CNg -L 6006:127.0.0.1:6006 root@140.207.205.182 -p 50000` +SSH隧道代理指令:`ssh -CNg -L 6006:127.0.0.1:6006 root+vm-k9hCcD0ufznGq16b@140.207.205.182 -p 50000` **-L6006:127.0.0.1:6006** diff --git a/docs/compute/domestic_gpu/mx_gpu.md b/docs/compute/domestic_gpu/mx_gpu.md index 0ca78a32bcdb08be8344796b6402efae94e9a754..4de3e94a4ec12c36db812e0b996a49aa596cc5b6 100644 --- a/docs/compute/domestic_gpu/mx_gpu.md +++ b/docs/compute/domestic_gpu/mx_gpu.md @@ -94,7 +94,7 @@ MACA 是沐曦 GPU 的统一计算加速平台。为了最大化保护您在现 例如,每秒(1000毫秒)刷新一次所有卡的温度、功耗和利用率信息,按下Ctrl+C可以退出监控。 - `mx-smi --show-temperature --show-board-power --show-usage-l1000` + `mx-smi --show-temperature --show-board-power --show-usage -l 1000` ### 官方资源 diff --git a/docs/compute/practices/comfyui.md b/docs/compute/practices/comfyui.md index 36db38dafe593692ad5199721c71f86294a4669b..84bcbf7b040c504db694c316cf9cc8818014ab8e 100644 --- a/docs/compute/practices/comfyui.md +++ b/docs/compute/practices/comfyui.md @@ -48,7 +48,7 @@ ComfyUI 是一款功能强大且高度模块化的图形用户界面(GUI), SSH隧道代理格式:`ssh -CNg -L 8188:127.0.0.1:8188 用户名@地址 -p 端口` -SSH隧道代理示例:`ssh -CNg -L 8188:127.0.0.1:8188 root@140.207.205.81 -p 50821` +SSH隧道代理示例:`ssh -CNg -L 8188:127.0.0.1:8188 root+vm-k9hCcD0ufznGq16b@140.207.205.81 -p 50821` :::tip 针对ComfyUI,我们只开放了8188端口进行访问,因此在使用该指令的时候,只需要替换用户名、地址、端口即可。输入指令并按回车后,系统会提示您输入密码(输入过程中,密码不会显示在屏幕上,这是正常现象)。请输入您上一步设置的密码并回车。如果连接成功,该终端窗口将不会有新的信息输出,代表隧道已成功建立。请保持此终端窗口持续运行,不要关闭它。 diff --git a/docs/compute/practices/img_model/Enflame-flux.1-krea-dev.md b/docs/compute/practices/img_model/Enflame-flux.1-krea-dev.md index 1c30e35c27a13d201517464575756da716e8428e..a8c558769cfcbe324dba6a1a7cb7d3a44fd7c3b5 100644 --- a/docs/compute/practices/img_model/Enflame-flux.1-krea-dev.md +++ b/docs/compute/practices/img_model/Enflame-flux.1-krea-dev.md @@ -40,20 +40,25 @@ sidebar_position: 1 输入以下脚本将加载模型和分词器,然后生成图片。 ```python -import os import torch -from diffusers import FluxPipeline import torch_gcu # 引入torch_gcu库 from torch_gcu import transfer_to_gcu # CUDA代码一键迁移 +from diffusers import FluxPipeline +#引用燧原S60的内置模型库,模型库的路径为/mnt/moark-models/ +model_name = "/mnt/moark-models/FLUX.1-Krea-dev" -token =os.environ.get("您的hugging face密钥") -pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-Krea-dev", torch_dtype=torch.bfloat16, token=token).to("gcu") +if torch.cuda.is_available(): + torch_dtype = torch.bfloat16 + device = "cuda" +else: + torch_dtype = torch.float32 + device = "cpu" -gen = torch.Generator("gcu").manual_seed(0) -#在输入提示词时,需要您使用英文哦 -image = pipe( - '''A 9:16 vertical, realistic cyber-aesthetic future social profile card photo: A hand gently holds a vertically semi-transparent acrylic card, occupying the visual center of the picture. The card presents the personal homepage interface of the future social platform "MoArk", with a minimalist design and no redundant decorations. The edges of the card are rounded and soft, with a gradient neon halo of pink-purple and ice blue. The background is deep and blurry, further highlighting the crystal-clear texture of the card itself. The interface information seems to be micro-engraved, three-dimensional and clear, displayed in sequence: +pipe = FluxPipeline.from_pretrained(model_name, torch_dtype=torch.bfloat16) +pipe = pipe.to(device) + +prompt = '''A 9:16 vertical, realistic cyber-aesthetic future social profile card photo: A hand gently holds a vertically semi-transparent acrylic card, occupying the visual center of the picture. The card presents the personal homepage interface of the future social platform "MoArk", with a minimalist design and no redundant decorations. The edges of the card are rounded and soft, with a gradient neon halo of pink-purple and ice blue. The background is deep and blurry, further highlighting the crystal-clear texture of the card itself. The interface information seems to be micro-engraved, three-dimensional and clear, displayed in sequence: Avatar (suspended in the center, with a holographic surround effect) Username and the dynamic "Verified Member" badge at the top Name: MoArk (MoArk) Computing Power Experience Officer @@ -61,18 +66,22 @@ Followers: 2,777 Following: 12,000 Join Date: 11/7/2025 Follow button (presenting a soft light touchable effect) -A soft light and shadow is reflected at the point where the finger touches, creating an atmosphere that is both cinematic and immersive, like a scene from a near-future live-action game.''', - guidance_scale=4.5, - num_inference_steps=int(os.environ.get("STEPS", "16")), # 您可以通过增大推理步数获得更加精美的图片。 - max_sequence_length=int(os.environ.get("MAX_SEQ_LEN", "256")), - generator=gen, +A soft light and shadow is reflected at the point where the finger touches, creating an atmosphere that is both cinematic and immersive, like a scene from a near-future live-action game.''' +image = pipe( + prompt, height=1024, width=1024, + guidance_scale=3.5, + num_inference_steps=30, + max_sequence_length=512, + generator=torch.Generator(device="cuda").manual_seed(42) ).images[0] -image.save("flux-krea-dev.png") + +#将模型的输出结果保存到flux-dev.png +image.save("flux-dev.png") ``` -推理步数完成后,创建新的cell输入```image```,即可获得图片。 +当模型推理结束后,在.ipynb上新建一行,输出变量`image`查看模型生成的图片,或者查看生成的图片文件flux-dev.png ![生成图片](/img/computility/Enflame_flux-krea-dev_img.jpg) :::tip @@ -96,9 +105,9 @@ image.save("flux-krea-dev.png") 2. 打开本地机器的终端 -设置完密码后,返回到电脑桌面,打开**文件资源管理器**或**我的电脑**,在顶部的地址栏中输入 cmd 并按回车键,即可打开终端命令行。 +设置完密码后,返回到电脑桌面,打开**文件资源管理器**或**我的电脑**,在顶部的地址栏中输入 powershell 并按回车键,即可打开终端命令行。 -![打开我的电脑](/img/computility/comfyui08.png) +![打开我的电脑](/img/computility/Enflame_flux-krea-dev_powershell.jpg) 3. 输入SSH隧道代理指令 @@ -110,7 +119,7 @@ image.save("flux-krea-dev.png") SSH隧道代理格式:`ssh -CNg -L 8188:127.0.0.1:8188 用户名@地址 -p 端口` -SSH隧道代理示例:`ssh -CNg -L 8188:127.0.0.1:8188 root@153.35.119.242 -p 10035` +SSH隧道代理示例:`ssh -CNg -L 8188:127.0.0.1:8188 root+vm-k9hCcD0ufznGq16b@153.35.119.242 -p 10035` 4. 在本地机器上访问模型 diff --git a/docs/compute/practices/img_model/diffusers.md b/docs/compute/practices/img_model/diffusers.md index 543edc997200cebc6b822bcfc7dc79521991a539..5a0f0149089b2123f2ce7c93b783acb5d6f3f72e 100644 --- a/docs/compute/practices/img_model/diffusers.md +++ b/docs/compute/practices/img_model/diffusers.md @@ -31,20 +31,23 @@ sidebar_position: 0 ![进入容器](/img/computility/model1.png) -### 步骤 2: 新建.ipynb文件 +### 步骤 3: 新建.ipynb文件 点击"notebook",新建一个.ipynb文件 ![进入容器](/img/computility/pytorch0.png) -输入以下脚本将加载模型和分词器,然后生成图片。 +### 步骤 4: 安装所需的diffuers库,部署模型,推理生成图片。 ```python +#安装diffusers库 +!pip install diffusers + from diffusers import DiffusionPipeline import torch -#如果是沐曦的曦云C500,可使用内置的模型路径 /mnt/moark-models/Qwen-Image -model_name = "Qwen/Qwen-Image" +#引用沐曦 曦云C500的内置模型库,模型库的路径为/mnt/moark-models/ +model_name = "/mnt/moark-models/Qwen-Image" # Load the pipeline if torch.cuda.is_available(): @@ -89,12 +92,15 @@ image = pipe( negative_prompt=negative_prompt, width=width, height=height, - num_inference_steps=50, + num_inference_steps=30, true_cfg_scale=4.0, generator=torch.Generator(device="cuda").manual_seed(42) ).images[0] + +#将模型的输出结果保存到qwen-image.png +image.save("qwen-image.png") ``` -当模型推理结束后,在.ipynb上新建一行,输出变量`image`,即可查看模型生成的图片。 +当模型推理结束后,在.ipynb上新建一行,输出变量`image`查看模型生成的图片,或者查看生成的图片文件qwen-image.png ![生成图片](/img/computility/pytorch_img.png) @@ -125,7 +131,7 @@ image = pipe( SSH隧道代理格式:`ssh -CNg -L 8188:127.0.0.1:8188 用户名@地址 -p 端口` -SSH隧道代理示例:`ssh -CNg -L 8188:127.0.0.1:8188 root@140.207.205.81 -p 50821` +SSH隧道代理示例:`ssh -CNg -L 8188:127.0.0.1:8188 root+vm-k9hCcD0ufznGq16b@140.207.205.81 -p 50821` 4. 在本地机器上访问模型 diff --git a/docs/compute/practices/model_library.md b/docs/compute/practices/model_library.md index d6dce319a7eae978ffa6ea9d33634e61adfba9ac..3ebee5cdc37a3d12f3576bf00141182c515ff396 100644 --- a/docs/compute/practices/model_library.md +++ b/docs/compute/practices/model_library.md @@ -5,17 +5,20 @@ sidebar_position: 1 # 内置模型库 ## 模型库介绍 -我们针对曦云C500算力集群内置热门的模型库,为用户提供便捷、高效的模型调用方式,省去下载模型的步骤。 +我们针对曦云C500算力集群、燧元S60内置热门的模型库,为用户提供便捷、高效的模型调用方式,省去下载模型的步骤。 :::tip -当前只有沐曦的曦云C500型号有内置模型库,而其他算力型号暂不支持。 +当前只有沐曦的曦云C500和燧元S60型号有内置模型库,而其他算力型号暂不支持。 ::: ## 功能特性 -- **预置模型,无需下载**:基于曦云C500算力集群,模型库内置了多种主流AI模型。所有模型均为只读文件,存储于固定路径,用户可直接加载使用,无需手动下载。 +- **预置模型,无需下载**:模型库内置了多种主流AI模型。所有模型均为只读文件,存储于固定路径,用户可直接加载使用,无需手动下载。 - **路径加载,即刻部署**:用户在进行模型开发时,可通过指定内置模型库的绝对路径来加载所需模型,简化了环境配置与部署流程。 ## 内置模型列表 +:::tip +每个算力集群所配备的模型数会有不同,使用前可先到该路径`/mnt/moark-models/`查看 +::: ### 图像与视觉生成模型 diff --git a/docs/compute/practices/text_model/transformers.md b/docs/compute/practices/text_model/transformers.md index 389a3e5d8d962ae4e984d9972f83127aa55e2e8b..e3d63cd9942b0e3ec934b3ee093e108ac66afade 100644 --- a/docs/compute/practices/text_model/transformers.md +++ b/docs/compute/practices/text_model/transformers.md @@ -64,9 +64,9 @@ from torch_gcu import transfer_to_gcu # CUDA代码一键迁移 ```python from transformers import AutoModelForCausalLM, AutoTokenizer +#如果是沐曦的曦云C500,可使用内置的模型路径 /mnt/moark-models/Qwen3-0.6B model_name = "Qwen/Qwen3-0.6B" -#如果是沐曦的曦云C500,可使用内置的模型路径 /mnt/moark-models/Qwen3-0.6B tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModelForCausalLM.from_pretrained( model_name, @@ -138,7 +138,7 @@ print("content:", content) SSH隧道代理格式:`ssh -CNg -L 8188:127.0.0.1:8188 用户名@地址 -p 端口` -SSH隧道代理示例:`ssh -CNg -L 8188:127.0.0.1:8188 root@140.207.205.81 -p 50821` +SSH隧道代理示例:`ssh -CNg -L 8188:127.0.0.1:8188 root+vm-k9hCcD0ufznGq16b@140.207.205.81 -p 50821` 4. 在本地机器上访问模型 diff --git a/docs/compute/practices/text_model/vllm_sglang.md b/docs/compute/practices/text_model/vllm_sglang.md index 8ae9f0b2bb68e8817fa389ada9c31393ce97a5d0..c0e2c9c074fb572056f45261b31fabf8bb2b65d9 100644 --- a/docs/compute/practices/text_model/vllm_sglang.md +++ b/docs/compute/practices/text_model/vllm_sglang.md @@ -120,7 +120,7 @@ python -m sglang.launch_server --model-path Qwen/Qwen3-0.6B --port 8188 SSH隧道代理格式:`ssh -CNg -L 8188:127.0.0.1:8188 用户名@地址 -p 端口` -SSH隧道代理示例:`ssh -CNg -L 8188:127.0.0.1:8188 root@140.207.205.81 -p 50821` +SSH隧道代理示例:`ssh -CNg -L 8188:127.0.0.1:8188 root+vm-k9hCcD0ufznGq16b@140.207.205.81 -p 50821` 4. 在本地机器上访问模型 diff --git a/static/img/computility/Enflame_flux-krea-dev_powershell.jpg b/static/img/computility/Enflame_flux-krea-dev_powershell.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a187ea1c90bc37d81d28c6ebd18430e102b03cae Binary files /dev/null and b/static/img/computility/Enflame_flux-krea-dev_powershell.jpg differ diff --git a/static/img/computility/Enflame_flux-krea-dev_terminal.jpg b/static/img/computility/Enflame_flux-krea-dev_terminal.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f96f467f9efdc00af35a578ab990195e12e1dfed Binary files /dev/null and b/static/img/computility/Enflame_flux-krea-dev_terminal.jpg differ diff --git a/static/img/computility/diffusers.png b/static/img/computility/diffusers.png new file mode 100644 index 0000000000000000000000000000000000000000..ea240efec3149937121385bbcd474188ed691e40 Binary files /dev/null and b/static/img/computility/diffusers.png differ