Closed simonSlamka closed 1 year ago
Device_string is not looking good.
@LysandreJik might know better than me where this is coming from.
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
@LysandreJik afaik this still hasn't been fixed
Hey @simonSlamka sorry for the late response. I think what you're trying to do is out of scope of what we're trying to do, we haven't designed the remote tools to work by specifying specific checkpoints in this way.
For this tool in particular (but this will need to be adapted to remote tools as these can be community contributed), here's how you would go about it:
from transformers import load_tool
imggen = load_tool(task_or_repo_id="huggingface-tools/text-to-image")
imggen.default_checkpoint = "hakurei/waifu-diffusion"
img = imggen("cute anime cat")
I think the best way to leverage a given checkpoint here would be to clone the existing remote tool, replace the checkpoint, and update the generation settings so that they work best with the checkpoint you have in mind. So you would have a remote tool of your own, for example simonSlamka/anime-text-to-image
that could be used to replace the existing image generation tool in the toolbox (or provided as an additional tool with anime as its focus).
Hope that helps!
Hi,
Thanks a lot for your assistance and guidance. I will do what you suggested.
Have a nice day!
System Info
Hey!
I have encountered an issue in the
agents
extra where callingload_tool()
withmodel_repo_id=<sd checkpoint model id>
causes aRuntimeError
to occur. It would appear that the repo id is being used as a device_id when using thetext-to-image
tool:Who can help?
cc @Narsil
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
transformers
transformers[agents]
load_tool
withmodel_repo_id
set to a valid sd checkpoint repo id:imggen = load_tool(task_or_repo_id="huggingface-tools/text-to-image", model_repo_id="hakurei/waifu-diffusion")
...img = imggen("cute anime cat")
Expected behavior
Pull model from hf hub or load from local and use in the txt2img task