This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # FLUX.1 schnell RunPod 부트스트랩 (LDV PoC) | |
| # 사용법: curl -sSL https://gist.githubusercontent.com/blaswan/<bootstrap-gist-id>/raw/bootstrap-flux.sh | bash | |
| set -e | |
| HANDLER_URL="https://gist.githubusercontent.com/blaswan/c78f11b64e24c27d5c1cdc4bdb9daf5b/raw/runpod-handler.py" | |
| echo "" | |
| echo "==========================================" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| FLUX.1 schnell self-hosted FastAPI handler for RunPod Pod (RTX 4090 / L40S). | |
| Spec: api-contract.md v0.1. | |
| Tested approach (선택 근거): | |
| - diffusers 직접 사용. ComfyUI는 워크플로우 JSON 의존성 + 디버깅 비용 큼. 단순 1엔드포인트 PoC는 diffusers가 빠름. | |
| - bf16 (4090 권장). FLUX.1 schnell 공식 dtype. | |
| - xformers attention 미사용 (FLUX는 sdpa 기본 충분). | |
| - offload 안 함 (4090 24GB로 schnell + bf16 충분히 fit). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const assert = (condition: boolean, messageOrError?: string | Error) => { | |
| if (!condition) { | |
| if (typeof messageOrError === "string" || typeof messageOrError === "undefined") { | |
| const message = messageOrError || "Assertion failed"; | |
| if (typeof Error !== "undefined") { | |
| throw new Error(message); | |
| } | |
| } else { | |
| throw messageOrError; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Salesboost 시작 --> | |
| <script> | |
| var FB_PIXEL_ID = 'YOUR_PIXEL_ID'; | |
| var FB_CURRENCY = 'KRW'; | |
| !function(w,d,s,u,t,e){t=d.createElement(s);t.async=!0;t.src=u; | |
| e=d.getElementsByTagName(s)[0];e.parentNode.insertBefore(t,e)}(window, | |
| document,'script','https://cdn.salesbooster.io/sdk/cafe24/web.min.js') | |
| </script> | |
| <!-- Salesboost 끝 --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Start Channel Plugin --> | |
| <script> | |
| window.channelPluginSettings = { | |
| "plugin_id": '${YOUR_PLUGIN_ID}' | |
| }; | |
| (function() { | |
| var node = document.createElement('div'); | |
| node.id = 'ch-plugin'; | |
| document.body.appendChild(node); | |
| var async_load = function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Start Channel Plugin --> | |
| <script> | |
| window.channelPluginSettings = { | |
| "plugin_id": '${YOUR_PLUGIN_ID}' | |
| }; | |
| if ('$MEMBER_ID$' !== undefined && '$MEMBER_ID$' !== '' && '$MEMBER_ID$' !== null) { | |
| window.channelPluginSettings.user = { | |
| id: '$MEMBER_ID$', | |
| meta: {} | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| address, | |
| article, | |
| aside, | |
| blockquote, | |
| canvas, | |
| center, | |
| dd, | |
| details, | |
| dir, | |
| div, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Channel Plugin Scripts --> | |
| <script> | |
| window.channelPluginSettings = { | |
| "plugin_id": "YOUR_PLUGIN_ID" | |
| }; | |
| <!--{? userInfo.member_seq }--> | |
| window.channelPluginSettings.user = { | |
| 'id': '{userid}', | |
| 'name': '{user_name}', | |
| 'mobileNumber': '{cellphone}', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class MyApplication extends Application { | |
| @Override | |
| public void onCreate() { | |
| super.onCreate(); | |
| ChannelPlugin.initialize(this, pluginKey); | |
| // ChannelPlugin.initialize(this, pluginKey, true); // for debug | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <application | |
| android:name="com.example.MyApplication" | |
| ... | |
| > | |
| ... | |
| <provider | |
| android:name="com.zoyi.channel.plugin.android.global.ChannelFileProvider" | |
| android:authorities="your.package.ch_provider" | |
| android:exported="false" | |
| android:grantUriPermissions="true"> |
NewerOlder