Text-to-Image
Diffusers
art
stable-diffusion
stable-diffusion-diffusers
SDXL
comic
guofeng
chinese style
Instructions to use Tasty-Rice/Magic_on_paper with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Tasty-Rice/Magic_on_paper with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Tasty-Rice/Magic_on_paper", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
| license: cc-by-nc-sa-4.0 | |
| license_name: cc-by-sa-4.0 | |
| license_link: https://spdx.org/licenses/CC-BY-NC-SA-4.0 | |
| library_name: diffusers | |
| pipeline_tag: text-to-image | |
| Developed by: 米饭不好吃 | |
| Model type: Diffusion-based text-to-image generative model | |
| Finetuned from model: Animagine XL 3.0 | |
| tags: | |
| - art | |
| - stable-diffusion | |
| - stable-diffusion-diffusers | |
| - SDXL | |
| - comic | |
| - guofeng | |
| - chinese style | |
| # Model Card for Model ID | |
| <!-- Provide a quick summary of what the model is/does. --> | |
| 如果你愿意我我将能更快开启下一次训练[赞助地址](https://afdian.com/a/TastyRice) 或者[另外一个网站](https://ko-fi.com/tasty_rice).,达到下一次训练金额后开启训练并交付(预训练金额3000元), | |
| 免费赞助用户将得到致谢展示,并将得到优先体验资格。 | |
| If you are willing, I will be able to start the next training [sponsorship address faster](https://afdian.com/a/TastyRice) or the next [adrress](https://ko-fi.com/tasty_rice), | |
| After reaching the next training amount, I will start the training and deliver it (pre training amount of 3000 yuan). | |
| Free sponsored users will receive a thank you display and will receive priority experience qualifications. | |
| This modelcard aims to be a base template for new models. It has been generated using [this raw template](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/modelcard_template.md?plain=1). | |
| ## 禁止融合 禁止融合 禁止融合 | |
| ## Merging models is not allowed。 Merging models is not allowed。 Merging models is not allowed。 | |
| ## Model Details | |
| Users of v3,v2 version can consider the scope of use by themselves but are prohibited from merging models, and are solely responsible for any problems that arise during use. I do not limit the scope of user use. | |
| The base model is about ACGN china guofeng style. It contains a variety of Chinese elements, such as Hanfu,qipao, cheongsam(chinese clothes(qipao)), Chinese ancient architecture, Chinese ancient painting style, etc. | |
| ### Model Description | |
| <!-- an guofeng anime model. --> | |
| - **Developed by (English name):** [Tasty-Rice](https://huggingface.co/Tasty-Rice) | |
| - **Developed by (Chinese name):** [米饭不好吃](https://www.liblib.art/userpage/99d29ad5db474146abbd70752f534981/publish) | |
| - **Model type:** [Diffusion based text to image generative model] | |
| - **Language(s) (NLP):** [English] | |
| - **License:** [CC-BY-NC-SA-4.0](https://spdx.org/licenses/CC-BY-NC-SA-4.0) | |
| - **Finetuned from model [optional]:** [Animagine XL 3.0](https://huggingface.co/cagliostrolab/animagine-xl-3.0) | |
| ### Model Sources [optional] | |
| Users of v3,v2 version can consider the scope of use by themselves but are prohibited from merging models, and are solely responsible for any problems that arise during use. I do not limit the scope of user use. | |
| <!-- .. --> | |
| ### Sample Picture | |
| <style> | |
| .title-container { | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| height: 100vh; /* Adjust this value to position the title vertically */ | |
| } | |
| .title1 { | |
| font-size: 2.5em; | |
| text-align: center; | |
| color: #333; | |
| font-family: 'Helvetica Neue', sans-serif; | |
| text-transform: uppercase; | |
| letter-spacing: 0.1em; | |
| padding: 0.5em 0; | |
| background: transparent; | |
| } | |
| .title2 { | |
| font-size: 2.5em; | |
| text-align: center; | |
| color: #333; | |
| font-family: 'Helvetica Neue', sans-serif; | |
| text-transform: uppercase; | |
| letter-spacing: 0.1em; | |
| padding: 0.5em 0; | |
| background: transparent; | |
| } | |
| .title3 { | |
| font-size: 2.5em; | |
| text-align: center; | |
| color: #333; | |
| font-family: 'Helvetica Neue', sans-serif; | |
| text-transform: uppercase; | |
| letter-spacing: 0.1em; | |
| padding: 0.5em 0; | |
| background: transparent; | |
| } | |
| .title1 span { | |
| background: -webkit-linear-gradient(45deg, #00FFF2, #28b485); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| } | |
| .title2 span { | |
| background: -webkit-linear-gradient(45deg, #FF0000, #28b485); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| } | |
| .title3 span { | |
| background: -webkit-linear-gradient(45deg, #FF0000, #28b485); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| } | |
| .custom-table { | |
| table-layout: fixed; | |
| width: 100%; | |
| border-collapse: collapse; | |
| margin-top: 2em; | |
| } | |
| .custom-table td { | |
| width: 50%; | |
| vertical-align: top; | |
| padding: 10px; | |
| box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.15); | |
| } | |
| .custom-image-container { | |
| position: relative; | |
| width: 100%; | |
| margin-bottom: 0em; | |
| overflow: hidden; | |
| border-radius: 10px; | |
| transition: transform .7s; | |
| /* Smooth transition for the container */ | |
| } | |
| .custom-image-container:hover { | |
| transform: scale(1.05); | |
| /* Scale the container on hover */ | |
| } | |
| .custom-image { | |
| width: 100%; | |
| height: auto; | |
| object-fit: cover; | |
| border-radius: 10px; | |
| transition: transform .7s; | |
| margin-bottom: 0em; | |
| } | |
| .nsfw-filter { | |
| filter: blur(8px); /* Apply a blur effect */ | |
| transition: filter 0.3s ease; /* Smooth transition for the blur effect */ | |
| } | |
| .custom-image-container:hover .nsfw-filter { | |
| filter: none; /* Remove the blur effect on hover */ | |
| } | |
| .overlay { | |
| position: absolute; | |
| bottom: 0; | |
| left: 0; | |
| right: 0; | |
| color: white; | |
| width: 100%; | |
| height: 40%; | |
| display: flex; | |
| flex-direction: column; | |
| justify-content: center; | |
| align-items: center; | |
| font-size: 1vw; | |
| font-style: bold; | |
| text-align: center; | |
| opacity: 0; | |
| /* Keep the text fully opaque */ | |
| background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 60%, rgba(0, 0, 0, 0) 100%); | |
| transition: opacity .5s; | |
| } | |
| .custom-image-container:hover .overlay { | |
| opacity: 1; | |
| } | |
| .overlay-text { | |
| background: linear-gradient(45deg, #7ed56f, #E00000); | |
| -webkit-background-clip: text; | |
| color: transparent; | |
| text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); | |
| .overlay-subtext { | |
| font-size: 0.75em; | |
| margin-top: 0.5em; | |
| font-style: italic; | |
| } | |
| .overlay, | |
| .overlay-subtext { | |
| text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); | |
| } | |
| </style> | |
| <h1 class="title3"> | |
| <span style="color:hsl(0,100%,50%);">Eilogue-v4</span> | |
| </h1> | |
| <table class="custom-table"> | |
| <tr> | |
| <td> | |
| <div class="custom-image-container"> | |
| <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/6545c5a508deaa0c91b9c6f9/V6uo1onkbgScDIpuZC-hb.png" alt="sample1"> | |
| </div> | |
| <div class="custom-image-container"> | |
| <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/6545c5a508deaa0c91b9c6f9/f-uni0Xk1JY7GyX48Km5L.png" alt="sample4"> | |
| </div> | |
| </td> | |
| <td> | |
| <div class="custom-image-container"> | |
| <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/6545c5a508deaa0c91b9c6f9/8GGE0A845ZPA3_yO2hCCr.png" alt="sample2"> | |
| </div> | |
| <div class="custom-image-container"> | |
| <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/6545c5a508deaa0c91b9c6f9/ajkJy_GMsFuBHAbGoTvJQ.png" alt="sample3"> | |
| </td> | |
| <td> | |
| <div class="custom-image-container"> | |
| <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/6545c5a508deaa0c91b9c6f9/2z-eH01DPfEUNSAq8f7am.png" alt="sample1"> | |
| </div> | |
| <div class="custom-image-container"> | |
| <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/6545c5a508deaa0c91b9c6f9/YROGbjSYk1drN3OWjDR0o.png" alt="sample4"> | |
| </div> | |
| </td> | |
| </tr> | |
| </table> | |
| <h1 class="title3"> | |
| <h1 class="title1"> | |
| <span style="color:hsl(0,100%,50%);">Probe-v3</span> | |
| </h1> | |
| <table class="custom-table"> | |
| <tr> | |
| <td> | |
| <div class="custom-image-container"> | |
| <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/6545c5a508deaa0c91b9c6f9/IuFCPKJc_A5Go7OCFNmdB.png" alt="sample1"> | |
| </div> | |
| <div class="custom-image-container"> | |
| <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/6545c5a508deaa0c91b9c6f9/b3sgiVNlWfEHbC2hbCWoM.png" alt="sample4"> | |
| </div> | |
| </td> | |
| <td> | |
| <div class="custom-image-container"> | |
| <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/6545c5a508deaa0c91b9c6f9/4qhd142z52ui_mRVJPRz3.png" alt="sample2"> | |
| </div> | |
| <div class="custom-image-container"> | |
| <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/6545c5a508deaa0c91b9c6f9/R8ddb8WKspEB8R-lagzYM.png" alt="sample3"> | |
| </td> | |
| <td> | |
| <div class="custom-image-container"> | |
| <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/6545c5a508deaa0c91b9c6f9/gW-1rUQkDusEjAqKW12vV.png" alt="sample1"> | |
| </div> | |
| <div class="custom-image-container"> | |
| <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/6545c5a508deaa0c91b9c6f9/w27ITlMIsx42r8WJA5K14.png" alt="sample4"> | |
| </div> | |
| </td> | |
| </tr> | |
| </table> | |
| <h1 class="title2"> | |
| <span style="style="color:#00e0d1;>Chapter-v2</span> | |
| </h1> | |
| <table class="custom-table"> | |
| <td> | |
| <div class="custom-image-container"> | |
| <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/6545c5a508deaa0c91b9c6f9/azlKdkwu4skOr60UieQ3U.png" alt="sample3"> | |
| </div> | |
| <div class="custom-image-container"> | |
| <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/6545c5a508deaa0c91b9c6f9/DkgsZ8xyMNo8hHQDPr3Pw.png" alt="sample4"> | |
| </td> | |
| <td> | |
| <div class="custom-image-container"> | |
| <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/6545c5a508deaa0c91b9c6f9/9I-deHdTD0-F8CGqM8C34.png" alt="sample2"> | |
| </div> | |
| <div class="custom-image-container"> | |
| <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/6545c5a508deaa0c91b9c6f9/MqmCBkQwdDj5f1nIgSsoi.png" alt="sample3"> | |
| </td> | |
| <td> | |
| <div class="custom-image-container"> | |
| <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/6545c5a508deaa0c91b9c6f9/IdiFCPSoLsUyfzA1S40Vv.png" alt="sample1"> | |
| </div> | |
| <div class="custom-image-container"> | |
| <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/6545c5a508deaa0c91b9c6f9/1doqZNg8-nB1hhJjeKuj1.png" alt="sample4"> | |
| </div> | |
| </td> | |
| </tr> | |
| </table> | |
| ### Multi Aspect Resolution | |
| 遵循这样的分辨率设置你将得到最好的体验,基于mj和stable AI的研究测试 | |
| 并非所有的分辨率都支持的非常好,但遵循这样的分辨率使用你将得到更好的体验。 | |
| Following this resolution setting will give you the best experience, based on research and testing using mj and stable AI. | |
| Not all resolutions support very well, but following these resolutions will give you a better experience. | |
| This model supports generating images at the following dimensions: | |
| | Dimensions | Aspect Ratio | Dimensions | Aspect Ratio | | |
| |---------------------|-------------------| ---------------------|-------------------| | |
| | `1024 x 1024` | 1:1 Square | | |
| | `704×1408` | 1:2 | `1408×704 ` | 2:1 | | |
| | `1472×704` | 23:11 | `704×1344 ` | 11:21 | | |
| | `960×1024` | 15:16 | `1024×960 ` | 16:15 | | |
| | `960×1088` | 15:17 | `1088×960 ` | 17:15 | | |
| | `896×1088` | 14:17 | `1088×896 ` | 17:14 | | |
| | `896×1152`Recommend | 7:9 | `1152×896 ` | 9:7 | | |
| | `832×1152` | 13:18Recommend | `1152×832 ` | 18:13Recommend | | |
| | `832×1216` | 13:19 | `1216×832 ` | 19:13 | | |
| | `768×1280` | 3:5 | `1280×768 ` | 5:3 | | |
| | `768×1344`Recommend | 4:7Vertical | `1344×768 `Recommend | 7:4Horizontal | | |
| | `1536×640` | 12:5 | `1600×640 ` | 5:2 | | |
| ## Style | |
| | class | descriptors | | |
| |-------------------|-------------------| | |
| | | Monochrome | | |
| | color | Colorful | | |
| | | Illustration | | |
| | | Cyberpunk | | |
| | | Ink wash painting style| | |
| | | Traditional Chinese painting style| | |
| | | Fantasy Art | | |
| | style | Anime | | |
| If your prompt does not emphasize the background, the background will be generated through style or solid color background, | |
| Directly generate large images with high precision, and normally do not require high-definition repair or refinement, unless a full body is required, such prompts may not necessarily cause confusion. | |
| The normal basic XL model comes with many styles. You can try to summon but the anime subject will not be affected by the concept you call | |
| Based on Animagine XL 3.0, Magic_on_paper falls under [CC-BY-NC-SA-4.0](https://spdx.org/licenses/CC-BY-NC-SA-4.0) license, which is compatible with Stable Diffusion models’ license. Key points: | |
| 1. **Modification Sharing:** If you modify Magic_on_paper any version, you must share both your changes and the original license. | |
| 2. **Source Code Accessibility:** If your modified version is network-accessible, provide a way (like a download link) for others to get the source code. This applies to derived models too. | |
| 3. **Distribution Terms:** Any distribution must be under this license or another with similar rules. | |
| 4. **Compliance:** Non-compliance must be fixed within 30 days to avoid license termination, emphasizing transparency and adherence to open-source values. | |
| ## Gradio & Colab Integration | |
| Try the demo powered by Gradio in Huggingface Spaces: [](https://huggingface.co/spaces/Tasty-Rice/Magic_on_paper) | |
| Or open the demo in Google Colab: [](https://colab.research.google.com/#fileId=https%3A//huggingface.co/spaces/Tasty-Rice/Magic_on_paper/blob/main/demo.ipynb) | |
| ## 🧨 Diffusers Installation | |
| First install the required libraries: | |
| ```bash | |
| pip install diffusers transformers accelerate safetensors --upgrade | |
| ``` | |
| Then run image generation with the following example code: | |
| ```python | |
| import torch | |
| from diffusers import DiffusionPipeline | |
| pipe = DiffusionPipeline.from_pretrained( | |
| "Tasty-Rice/Magic_on_paper", | |
| torch_dtype=torch.float16, | |
| use_safetensors=True, | |
| ) | |
| pipe.to('cuda') | |
| prompt = "1girl,Elegant,Portrait Photogram,detailed gorgeous face " | |
| negative_prompt = "nsfw,lowres,bad anatomy,bad hands,text,error,missing fingers,extra digit,fewer digits,cropped,worst quality,low quality,normal quality,jpeg artifacts,signature,watermark,username,blurry,artist name" | |
| image = pipe( | |
| prompt, | |
| negative_prompt=negative_prompt, | |
| width=768, | |
| height=1344, | |
| guidance_scale=7, | |
| num_inference_steps=28 | |
| ).images[0] | |
| image.save("./output/test.png") | |
| ``` | |
| **Suggested parameters** —— ***The following is a horizontal introduction, not a vertical correspondence.*** | |
| | Sampler | DPM++2M SDE Karras| Euler | Euler a | Others u can try | | |
| |-------------------|-------------------| -----------------| -----------------| -----------------| | |
| | CFG Scale | 7(recommend) | 7.5(recommend) | 8(recommend) | 2~15(limit) | | |
| **Notice/The content of the additional terms** | |
| | Number | Terms and Conditions | | |
| |------------|---------------------------------------------------------------------------------------------------| | |
| | 1 | Do not host this model or its derivatives on websites/applications that generate income or donations. For commercial use, please contact the owner through the platform. | | |
| | 2 | Do not directly sell generated images unless they have undergone sufficient manual modification and are deemed personal works. Violators will be subject to legal consequences. | | |
| | 3 | Do not intentionally create or share illegal or harmful content. Please abide by public order and morality, and use it for positive purposes. | | |
| | 4 | By using this model, you agree to all terms and conditions. | | |
| | 5 | The model is limited to personal use and cannot be used for commercial purposes. | | |
| | 6 | Do not use the model for illegal or harmful purposes, such as infringing rights, spreading false information, etc. | | |
| | 7 | Users shall abide by all applicable laws and regulations, including safety, data protection, etc. | | |
| | 8 | Respect the rights of others and do not infringe the rights of third parties. | | |
| | 9 | Disputes or lawsuits shall be borne by the user's own legal responsibility. | | |
| | 10 | Take necessary technical and management measures to ensure data security and confidentiality. | | |
| | 11 | Comply with intellectual property laws and do not infringe the intellectual property rights of third parties. | | |
| | 12 | Do not exploit or harm minors, and do not involve content, activities, or services related to minors. | | |
| | 13 | Do not generate or disseminate verifiable false information or content that harms others. | | |
| | 14 | Do not defame, discredit, or harass others in any other way. | | |
| | 15 | Do not make fully automated decisions that adversely affect the legitimate rights of individuals or create legal obligations. | | |
| | 16 | Do not discriminate or harm individuals or groups, including based on social behavior or known characteristics. | | |
| | 17 | Do not exploit the vulnerabilities of specific groups, distort related behaviors, and cause or potentially cause physical or psychological harm. | | |
| | 18 | Do not discriminate or harm based on protected characteristics or categories. | | |
| | 19 | Do not use for medical consultation or interpretation of medical results. | | |
| | 20 | Do not generate or disseminate information for judicial, law enforcement, immigration, or asylum proceedings, such as predicting criminal behavior. | |