Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while executing the script #2

Open
BubbleBadH opened this issue Feb 26, 2023 · 3 comments
Open

Error while executing the script #2

BubbleBadH opened this issue Feb 26, 2023 · 3 comments

Comments

@BubbleBadH
Copy link

I just installed onnx and it throws an error while executing txt2img.py
The error goes as follows:
fusersUI# python3 txt2img_onnx.py
Error in cpuinfo: failed to parse the list of possible processors in /sys/devices/system/cpu/possible
Error in cpuinfo: failed to parse the list of present processors in /sys/devices/system/cpu/present
Error in cpuinfo: failed to parse both lists of possible and present processors
terminate called after throwing an instance of 'onnxruntime::OnnxRuntimeException'
what(): /onnxruntime_src/include/onnxruntime/core/common/logging/logging.h:294 static const onnxruntime::logging::Logger& onnxruntime::logging::LoggingManager::DefaultLogger() Attempt to use DefaultLogger but none has been registered.

root@localhost:
I've installed all the libraries u said

@ClashSAN
Copy link
Owner

I have a different script that might work:

from diffusers import StableDiffusionOnnxPipeline
import torch
from diffusers import (
    DDPMScheduler,
    DDIMScheduler,
    PNDMScheduler,
    LMSDiscreteScheduler,
    EulerDiscreteScheduler,
    EulerAncestralDiscreteScheduler,
    DPMSolverMultistepScheduler
)

scheduler = DPMSolverMultistepScheduler.from_pretrained("./model", subfolder="scheduler")

pipe = StableDiffusionOnnxPipeline.from_pretrained(
    './model',
    custom_pipeline="lpw_stable_diffusion_onnx",
    revision="onnx",
    scheduler=scheduler,
    safety_checker=None,
    provider="CPUExecutionProvider"
)


prompt = "test prompt"
neg_prompt = ""
                                                                                                                       
generator = torch.Generator(device="cpu").manual_seed(1)



image = pipe.text2img(prompt,negative_prompt=neg_prompt, num_inference_steps=8, width=192, height=256, guidance_scale=10, generator=generator, max_embeddings_multiples=3).images[0]
image.save('./test.png')

@BubbleBadH
Copy link
Author

Still shows the same error

@BubbleBadH
Copy link
Author

Someone help me with the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants