This message was deleted.
# ask-for-help
s
This message was deleted.
l
Hi,
bentoml.diffusers
is to simplify the usage of diffusers in BentoML. It has not much difference with using diffusers by itself. Though
bentoml.diffusers
will try to utilize
xformers
to accelerate the computation, you can also use xformers if you use diffusers yourself
🍱 2
s
I see thanks! Currently
bentoml.diffusers
creates a bug for me (opened an issue for that), but using diffusers with a custom bentoml runner works
Is it known if Stable Diffusion images can be batched? In Diffusers it should be possible right ?
Copy code
@bentoml.Runnable.method(batchable=False, batch_dim=0)
        def txt2img(self, input_data):
If I set
batchable=True
the generation does not seem to work. Is the batch dimension a different one than 0 ?
l
Hi Self, I think the batching in Stable Diffusion need a lot of settings (width etc.) to be the same inside a batch. What BentoML's batching do is actually merging single requests from different users to a batch and feed the batch to model. In sd's context I think it may be not helpful to turn on batching.
And what is the issue you open? I haven't found it yet.
s
I see you have replied on the issue, thanks! The batching makes sense and would likely be independent of the API batching of bentoml (thinking of a GPU with lots of memory to generate e.g. 2 or 4 images in a single batch)