【求助帖】AutoDL原生stable-diffusion-3.5-medium模型无卡模式启动和使用 #592

Open
opened 2025-03-03 21:15:18 +08:00 by CharlieXie · 1 comment

使用modelscope下载stable-diffusion-3.5-medium模型如下
image
调用代码如下:
import torch
from diffusers import StableDiffusion3Pipeline

#pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3.5-medium", torch_dtype=torch.bfloat16)
pipe = StableDiffusion3Pipeline.from_pretrained("/root/autodl-tmp/Diffusion-Model", torch_dtype=torch.bfloat16)
pipe = pipe.to("cuda")

image = pipe(
"A capybara holding a sign that reads Hello World",
num_inference_steps=40,
guidance_scale=4.5,
).images[0]
image.save("capybara.png")
调用失败如图,是否因为无卡模式原因?
image

使用modelscope下载stable-diffusion-3.5-medium模型如下 <img width="316" alt="image" src="/attachments/550d4ee7-5f47-4aca-a893-5c082d4fd65b"> 调用代码如下: import torch from diffusers import StableDiffusion3Pipeline #pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3.5-medium", torch_dtype=torch.bfloat16) pipe = StableDiffusion3Pipeline.from_pretrained("/root/autodl-tmp/Diffusion-Model", torch_dtype=torch.bfloat16) pipe = pipe.to("cuda") image = pipe( "A capybara holding a sign that reads Hello World", num_inference_steps=40, guidance_scale=4.5, ).images[0] image.save("capybara.png") 调用失败如图,是否因为无卡模式原因? <img width="1064" alt="image" src="/attachments/89a3f0c6-10cf-4d7c-b7e9-b64e26a592f1">

可能是由于内存问题,可以减少prompt数量为1个再试试,不行的话就只能用显存跑了

可能是由于内存问题,可以减少prompt数量为1个再试试,不行的话就只能用显存跑了
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: HswOAuth/llm_course#592
No description provided.