diffusers
diffusers copied to clipboard
Diffusers Stable Diffusion upscale pipeline
Describe the bug
I get this message when I try to upscale a image
(/tmp/pip-install-r2dsw42o/xformers_584b8336664f4e63bb32e09d7dcaeac6/third_party/flash-attention/csrc/flash_attn/src/fmha_fprop_fp16_kernel.sm80.cu:68): invalid argument
I can't find the culprit unfortunately, thank you!!
Reproduction
No response
Logs
CUDA error (/tmp/pip-install-r2dsw42o/xformers_584b8336664f4e63bb32e09d7dcaeac6/third_party/flash-attention/csrc/flash_attn/src/fmha_fprop_fp16_kernel.sm80.cu:68): invalid argument
System Info
diffusers 0.9.0 Ubuntu 20.4 LTS
Hey @UglyStupidHonest,
Could you please add a reproducible code snippet?
Hey sure its pretty much the example for that model
from diffusers import StableDiffusionPipeline, DDIMScheduler , EulerDiscreteScheduler,KarrasVeScheduler from diffusers import StableDiffusionUpscalePipeline import torch import os from realesrgan import RealESRGANer import random import requests from PIL import Image from io import BytesIO
import requests from PIL import Image from io import BytesIO from diffusers import StableDiffusionUpscalePipeline import torch
load model and scheduler
model_id = "stabilityai/stable-diffusion-x4-upscaler" pipeline = StableDiffusionUpscalePipeline.from_pretrained(model_id, revision="fp16", torch_dtype=torch.float16,cache_dir="/media/chris/Elements/hfcache/huggingface/diffusers") pipeline = pipeline.to("cuda")
let's download an image
url = "https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/sd2-upscale/low_res_cat.png" response = requests.get(url) low_res_img = Image.open(BytesIO(response.content)).convert("RGB") low_res_img = low_res_img.resize((128, 128))
prompt = "a white cat"
upscaled_image = pipeline(prompt=prompt, image=low_res_img).images[0] upscaled_image.save("upsampled_cat.png")
Hey I solved it it was probably a faulty xformers install :)