Comments (10)
Alright here it is, feel free to give it a try. I was able to use it to convert both I64 and F64 containing models to something sdcpp could work with:
from stable-diffusion.cpp.
I've written a small converter program in C that re-encodes entire safetensor files that does seem to do the job, once I put in handling for those using big-endian systems I'll publish it. Having trouble getting similar logic to work a la carte at tensor loading time in sdcpp though.
from stable-diffusion.cpp.
https://civitai.com/models/8124?modelVersionId=87886
https://civitai.com/models/7371/rev-animated
Look for the bigger files, like 4-5GB. they often are FP64
from stable-diffusion.cpp.
Can you manually set the type to f32?
from stable-diffusion.cpp.
I have the same issue with a model called revAnimated_v122 but trying to convert it to F32 or F16 it gets corrupt and takes only 809Kb
Did you managed to fix it?
from stable-diffusion.cpp.
Having this issue too with other models in the SD1.5 family.
Could this be looked at?
from stable-diffusion.cpp.
I suspect this has to do with GGML currently only having support for up to 32-bit width integer and float types in it's ggml_type. It might be possible if one is willing to accept a loss in precision to convert down to a 32-bit float, provided it does not exceed FLT_MAX, via a callback in the sdcpp load_tensors function.
from stable-diffusion.cpp.
Could someone please link a model where they are having the F64 problem? I think I've put together a fix that at least seems to work with the LoRAs I have that use I64.
from stable-diffusion.cpp.
can you add converting to fp16 too?
from stable-diffusion.cpp.
can you add converting to fp16 too?
It now has handling to convert down into F16 as well as BF16 using the -f, --float-out switch, although with the caveat that if your system isn't using IEEE format floats and doubles it might not get the conversion right. Don't use the --replace option unless you want to risk losing data.
from stable-diffusion.cpp.
Related Issues (20)
- report a bug instead of crash when vae_decoder_only=True and using img2img HOT 2
- txt2img can not be called multiple times. HOT 4
- Lora broken output HOT 19
- Different input, output VAE separately
- --steps 0
- Be careful posting anime pictures! HOT 1
- Inference bottleneck HOT 11
- Suggestion: simple one-call function to make stable-diffusion.dll accessible for newbie coders
- Split the api to support comfyui like workflow HOT 1
- memsize was hardcoded in preprocess_canny function
- Macos binary is using an absolute library path HOT 1
- Vulkan support HOT 1
- [Feature Request] Enable Flash Attention in the released binary
- Enabling Flash Attention completely breaks prompt following ("Dog" and "Cat" generates identical image)
- [Feature Request] Support for SDXS-512, allowing for real-time image generation on the CPU (~0.6 seconds per image) HOT 4
- Much higher RAM usage (2-3 times) compared to FastSDCPU when using the exact same models/settings HOT 2
- Any GUI / webui for this? HOT 7
- Access GPU data of result
- Error when compile with latest GGML: ggml_quantize_chunk HOT 2
- Fixed random generator HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stable-diffusion.cpp.