Instructions to use PakNin/chao-hu with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use PakNin/chao-hu with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("PakNin/chao-hu") prompt = "巢湖、渔船、渔民撒网" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
| tags: | |
| - text-to-image | |
| - lora | |
| - diffusers | |
| - template:sd-lora | |
| - ai-toolkit | |
| widget: | |
| - text: "\u5DE2\u6E56\u3001\u6E14\u8239\u3001\u6E14\u6C11\u6492\u7F51" | |
| output: | |
| url: samples/1777822294363__000001000_0.jpg | |
| - text: "\u5DE2\u6E56\u3001\u6E14\u8239\u3001\u6E14\u6C11\u6492\u7F51\u3001\u570B\ | |
| \u756B\u98A8" | |
| output: | |
| url: samples/1777822395149__000001000_1.jpg | |
| - text: "\u5DE2\u6E56\u3001\u6E14\u8239\u3001\u6E14\u6C11\u6492\u7F51\u3001\u4E24\ | |
| \u5CB8\u9752\u5C71\u3001\u88D5\u6EAA\u6CB3\u7530\u56ED\u5C71\u666F" | |
| output: | |
| url: samples/1777822495797__000001000_2.jpg | |
| base_model: Qwen/Qwen-Image | |
| instance_prompt: 巢湖 | |
| license: creativeml-openrail-m | |
| # chao-hu | |
| Model trained with [AI Toolkit by Ostris](https://github.com/ostris/ai-toolkit) | |
| <Gallery /> | |
| ## Trigger words | |
| You should use `巢湖` to trigger the image generation. | |
| ## Download model and use it with ComfyUI, AUTOMATIC1111, SD.Next, Invoke AI, etc. | |
| Weights for this model are available in Safetensors format. | |
| [Download](/PakNin/chao-hu/tree/main) them in the Files & versions tab. | |
| ## Use it with the [🧨 diffusers library](https://github.com/huggingface/diffusers) | |
| ```py | |
| from diffusers import AutoPipelineForText2Image | |
| import torch | |
| pipeline = AutoPipelineForText2Image.from_pretrained('Qwen/Qwen-Image', torch_dtype=torch.float16).to('cuda') | |
| pipeline.load_lora_weights('PakNin/chao-hu', weight_name='chao-hu.safetensors') | |
| image = pipeline('巢湖、渔船、渔民撒网').images[0] | |
| image.save("my_image.png") | |
| ``` | |
| For more details, including weighting, merging and fusing LoRAs, check the [documentation on loading LoRAs in diffusers](https://huggingface.co/docs/diffusers/main/en/using-diffusers/loading_adapters) | |