Sanster / lama-cleaner-docs

Lama Cleaner Docs
https://lama-cleaner-docs.vercel.app
MIT License
4 stars 6 forks source link

Feedback for “Stable Diffusion” #16

Open tom729 opened 1 year ago

tom729 commented 1 year ago

I can't choose the sd1.5 as the model, it returns the error " argument --model: invalid choice: 'sd1.5' (choose from 'lama', 'ldm', 'zits', 'mat', 'fcf')"

Is there wrong config or version about this issue?

tom729 commented 1 year ago

command line "lama-cleaner --model=sd1.5 --device=cpu --port=8080 " platform: macbook M1

Sanster commented 1 year ago

Please install latest version pip install lama-cleaner==0.37.1

tom729 commented 1 year ago

great, how can I use macbook M1 GPU to run the program, does the version 0.37.1 support device==mps?

Sanster commented 1 year ago

yes, following models support mps:

MPS_SUPPORT_MODELS = [
    "instruct_pix2pix",
    "sd1.5",
    "anything4",
    "realisticVision1.4",
    "sd2",
    "paint_by_example",
]
tom729 commented 1 year ago

wow, cool

tom729 commented 1 year ago

2023-03-29 18:36:47.044 | INFO | lama_cleaner.server:process:267 - Origin image shape: (1500, 1013, 3) 2023-03-29 18:36:47.044 | INFO | lama_cleaner.server:process:269 - Resized image shape: (1500, 1013, 3) 2023-03-29 18:36:47.044 | INFO | lama_cleaner.model.base:_scaled_pad_forward:276 - Resize image to do sd inpainting: (1228, 1013, 3) -> (1228, 1013, 3) 2023-03-29 18:36:47.045 | INFO | lama_cleaner.model.base:_pad_forward:56 - final forward pad size: (1232, 1016, 3) 0%| | 0/30 [00:00<?, ?it/s]/AppleInternal/Library/BuildRoots/5b8a32f9-5db2-11ed-8aeb-7ef33c48bc85/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShaders/MPSCore/Types/MPSNDArray.mm:724: failed assertion `[MPSNDArray initWithDevice:descriptor:] Error: total bytes of NDArray > 2**32'

tom729 commented 1 year ago

the error above generated when I use mps to process the erase task.

Sanster commented 1 year ago

looks like image is too large, you can try croper or resize mentioned here https://lama-cleaner-docs.vercel.app/features/croper_resize