unishift / stable-diffusion-remix

22 stars 2 forks source link

hello, I'm trying to try to turn on the program but I see an error #1

Open nikolaiusa opened 1 year ago

nikolaiusa commented 1 year ago

(venv) N:\remix\venv\Scripts>python run.py N:\remix\venv\Scripts\2.png N:\remix\venv\Scripts\1.png A matching Triton is not available, some optimizations will not be enabled. Error caught was: No module named 'triton' Using device: cuda unet\diffusion_pytorch_model.safetensors not found Keyword arguments {'variation': 'fp16'} are not expected by StableRemix and will be ignored. Traceback (most recent call last): File "N:\remix\venv\Scripts\run.py", line 402, in main() File "N:\remix\venv\Scripts\run.py", line 394, in main images = run_remixing(pipe, content_img, style_img, [0.6, 0.65, 0.7]) File "N:\remix\venv\Scripts\run.py", line 362, in run_remixing image = pipe(image=content_img, image_embeds=emb, *kwargs).images[0] File "N:\remix\venv\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(args, **kwargs) File "N:\remix\venv\Scripts\run.py", line 289, in call image = image_processor.preprocess(image) File "N:\remix\venv\Scripts\run.py", line 73, in preprocess image = super().preprocess(image) File "N:\remix\venv\lib\site-packages\diffusers\image_processor.py", line 169, in preprocess image = [self.resize(i, height, width) for i in image] File "N:\remix\venv\lib\site-packages\diffusers\image_processor.py", line 169, in image = [self.resize(i, height, width) for i in image] TypeError: StableRemixImageProcessor.resize() takes 2 positional arguments but 4 were given

usamaehsan commented 1 year ago

i have got same error, are you able to solve it?

usamaehsan commented 1 year ago

ok, i have solved it: add h, w in resize function of StableRemixImageProcessor in run.py

`class StableRemixImageProcessor(VaeImageProcessor): def init(self, w, h): super().init() self.w = w self.h = h

def resize(self, image, h, w):
    image = center_resize_crop(image, self.w)
    return image

def preprocess(self, image):
    image = super().preprocess(image)
    # image = randomize_color(image)

    return image`
nikolaiusa commented 1 year ago

ok, i have solved it: add h, w in resize function of StableRemixImageProcessor in run.py

`class StableRemixImageProcessor(VaeImageProcessor): def init(self, w, h): super().init() self.w = w self.h = h

def resize(self, image, h, w):
    image = center_resize_crop(image, self.w)
    return image

def preprocess(self, image):
    image = super().preprocess(image)
    # image = randomize_color(image)

    return image`

thx mister