This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/ops.cpp b/ops.cpp | |
| index 6190d0d..c44157b 100644 | |
| --- a/ops.cpp | |
| +++ b/ops.cpp | |
| @@ -2347,7 +2347,7 @@ static void ggml_compute_forward_repeat_back_f32( | |
| GGML_ASSERT(nb00 == sizeof(float)); | |
| if (ggml_is_contiguous(dst)) { | |
| - ggml_vec_set_f32(ne0*ne1*ne2*ne3, dst->data, 0); | |
| + ggml_vec_set_f32(ne0*ne1*ne2*ne3, (float *)dst->data, 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 11a12,13 | |
| > #include "ggml-cpu/unary-ops.h" | |
| > #include "ggml-cpu/binary-ops.h" | |
| 4292,4625d4293 | |
| < static void ggml_compute_forward_add_f32( | |
| < const struct ggml_compute_params * params, | |
| < struct ggml_tensor * dst) { | |
| < | |
| < const struct ggml_tensor * src0 = dst->src[0]; | |
| < const struct ggml_tensor * src1 = dst->src[1]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "ggml.h" | |
| #include "ggml-cpu.h" | |
| #ifdef GGML_USE_CUDA | |
| #include "ggml-cuda.h" | |
| #endif | |
| #include <vector> | |
| #include <iostream> | |
| #include <chrono> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "ggml.h" | |
| #include "ggml-cpu.h" | |
| #ifdef GGML_USE_CUDA | |
| #include "ggml-cuda.h" | |
| #endif | |
| #include <vector> | |
| #include <iostream> | |
| #include <chrono> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "ggml.h" | |
| #include "ggml-cpu.h" | |
| #ifdef GGML_USE_CUDA | |
| #include "ggml-cuda.h" | |
| #endif | |
| #include <vector> | |
| #include <iostream> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pefile | |
| import sys | |
| if len(sys.argv) < 2: | |
| print("Error: No file path specified. Usage: python hexdump.py <file_path>") | |
| sys.exit(1) | |
| file_path = sys.argv[1] | |
| try: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import os | |
| import platform | |
| from importlib.metadata import version as pkg_version | |
| from sdkit.utils import log | |
| from easydiffusion import app | |
| # future home of scripts/check_modules.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import torch | |
| import tensorrt as trt | |
| from polygraphy import cuda | |
| import sys | |
| from packaging import version | |
| from diffusers import StableDiffusionPipeline | |
| from diffusers.pipelines.onnx_utils import OnnxRuntimeModel, ORT_TO_NP_TYPE | |
| from dataclasses import dataclass | |
| import numpy as np | |
| import onnxruntime as ort |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sdkit import Context | |
| from sdkit.generate import generate_images | |
| from sdkit.utils import load_tensor_file, save_tensor_file | |
| from ldm.util import instantiate_from_config | |
| from omegaconf import OmegaConf | |
| import time | |
| model_path = "/path/to/models/stable-diffusion/sd-v1-4.ckpt" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| MODEL_PATH = "F:/models/stable-diffusion/sd-v1-4.ckpt" | |
| CONFIG_PATH = "F:/models/stable-diffusion/v1-inference.yaml" | |
| DEVICE = "mps" # or "cuda" or "cpu" | |
| def diff(): | |
| print('diffusers') | |
| import torch | |
| from transformers import logging as tr_logging |