Instructions to use TechCarbasa/MyModels with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use TechCarbasa/MyModels with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="TechCarbasa/MyModels", filename="workspace/ComfyUI/models/WanVideo/Wan2.1-single/wan2.1-i2v-14b-480p-Q5_0.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use TechCarbasa/MyModels with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf TechCarbasa/MyModels:Q5_0 # Run inference directly in the terminal: llama-cli -hf TechCarbasa/MyModels:Q5_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf TechCarbasa/MyModels:Q5_0 # Run inference directly in the terminal: llama-cli -hf TechCarbasa/MyModels:Q5_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf TechCarbasa/MyModels:Q5_0 # Run inference directly in the terminal: ./llama-cli -hf TechCarbasa/MyModels:Q5_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf TechCarbasa/MyModels:Q5_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf TechCarbasa/MyModels:Q5_0
Use Docker
docker model run hf.co/TechCarbasa/MyModels:Q5_0
- LM Studio
- Jan
- Ollama
How to use TechCarbasa/MyModels with Ollama:
ollama run hf.co/TechCarbasa/MyModels:Q5_0
- Unsloth Studio
How to use TechCarbasa/MyModels with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for TechCarbasa/MyModels to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for TechCarbasa/MyModels to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for TechCarbasa/MyModels to start chatting
- Pi
How to use TechCarbasa/MyModels with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf TechCarbasa/MyModels:Q5_0
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "TechCarbasa/MyModels:Q5_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use TechCarbasa/MyModels with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf TechCarbasa/MyModels:Q5_0
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default TechCarbasa/MyModels:Q5_0
Run Hermes
hermes
- Docker Model Runner
How to use TechCarbasa/MyModels with Docker Model Runner:
docker model run hf.co/TechCarbasa/MyModels:Q5_0
- Lemonade
How to use TechCarbasa/MyModels with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull TechCarbasa/MyModels:Q5_0
Run and chat with the model
lemonade run user.MyModels-Q5_0
List all available models
lemonade list
Upload /workspace/ComfyUI/models/configs/v2-inpainting-inference.yaml with huggingface_hub
Browse files
workspace/ComfyUI/models/configs/v2-inpainting-inference.yaml
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
|
|
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|
| 4 |
+
params:
|
| 5 |
+
linear_start: 0.00085
|
| 6 |
+
linear_end: 0.0120
|
| 7 |
+
num_timesteps_cond: 1
|
| 8 |
+
log_every_t: 200
|
| 9 |
+
timesteps: 1000
|
| 10 |
+
first_stage_key: "jpg"
|
| 11 |
+
cond_stage_key: "txt"
|
| 12 |
+
image_size: 64
|
| 13 |
+
channels: 4
|
| 14 |
+
cond_stage_trainable: false
|
| 15 |
+
conditioning_key: hybrid
|
| 16 |
+
scale_factor: 0.18215
|
| 17 |
+
monitor: val/loss_simple_ema
|
| 18 |
+
finetune_keys: null
|
| 19 |
+
use_ema: False
|
| 20 |
+
|
| 21 |
+
unet_config:
|
| 22 |
+
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
|
| 23 |
+
params:
|
| 24 |
+
use_checkpoint: True
|
| 25 |
+
image_size: 32 # unused
|
| 26 |
+
in_channels: 9
|
| 27 |
+
out_channels: 4
|
| 28 |
+
model_channels: 320
|
| 29 |
+
attention_resolutions: [ 4, 2, 1 ]
|
| 30 |
+
num_res_blocks: 2
|
| 31 |
+
channel_mult: [ 1, 2, 4, 4 ]
|
| 32 |
+
num_head_channels: 64 # need to fix for flash-attn
|
| 33 |
+
use_spatial_transformer: True
|
| 34 |
+
use_linear_in_transformer: True
|
| 35 |
+
transformer_depth: 1
|
| 36 |
+
context_dim: 1024
|
| 37 |
+
legacy: False
|
| 38 |
+
|
| 39 |
+
first_stage_config:
|
| 40 |
+
target: ldm.models.autoencoder.AutoencoderKL
|
| 41 |
+
params:
|
| 42 |
+
embed_dim: 4
|
| 43 |
+
monitor: val/rec_loss
|
| 44 |
+
ddconfig:
|
| 45 |
+
#attn_type: "vanilla-xformers"
|
| 46 |
+
double_z: true
|
| 47 |
+
z_channels: 4
|
| 48 |
+
resolution: 256
|
| 49 |
+
in_channels: 3
|
| 50 |
+
out_ch: 3
|
| 51 |
+
ch: 128
|
| 52 |
+
ch_mult:
|
| 53 |
+
- 1
|
| 54 |
+
- 2
|
| 55 |
+
- 4
|
| 56 |
+
- 4
|
| 57 |
+
num_res_blocks: 2
|
| 58 |
+
attn_resolutions: [ ]
|
| 59 |
+
dropout: 0.0
|
| 60 |
+
lossconfig:
|
| 61 |
+
target: torch.nn.Identity
|
| 62 |
+
|
| 63 |
+
cond_stage_config:
|
| 64 |
+
target: ldm.modules.encoders.modules.FrozenOpenCLIPEmbedder
|
| 65 |
+
params:
|
| 66 |
+
freeze: True
|
| 67 |
+
layer: "penultimate"
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
data:
|
| 71 |
+
target: ldm.data.laion.WebDataModuleFromConfig
|
| 72 |
+
params:
|
| 73 |
+
tar_base: null # for concat as in LAION-A
|
| 74 |
+
p_unsafe_threshold: 0.1
|
| 75 |
+
filter_word_list: "data/filters.yaml"
|
| 76 |
+
max_pwatermark: 0.45
|
| 77 |
+
batch_size: 8
|
| 78 |
+
num_workers: 6
|
| 79 |
+
multinode: True
|
| 80 |
+
min_size: 512
|
| 81 |
+
train:
|
| 82 |
+
shards:
|
| 83 |
+
- "pipe:aws s3 cp s3://stability-aws/laion-a-native/part-0/{00000..18699}.tar -"
|
| 84 |
+
- "pipe:aws s3 cp s3://stability-aws/laion-a-native/part-1/{00000..18699}.tar -"
|
| 85 |
+
- "pipe:aws s3 cp s3://stability-aws/laion-a-native/part-2/{00000..18699}.tar -"
|
| 86 |
+
- "pipe:aws s3 cp s3://stability-aws/laion-a-native/part-3/{00000..18699}.tar -"
|
| 87 |
+
- "pipe:aws s3 cp s3://stability-aws/laion-a-native/part-4/{00000..18699}.tar -" #{00000-94333}.tar"
|
| 88 |
+
shuffle: 10000
|
| 89 |
+
image_key: jpg
|
| 90 |
+
image_transforms:
|
| 91 |
+
- target: torchvision.transforms.Resize
|
| 92 |
+
params:
|
| 93 |
+
size: 512
|
| 94 |
+
interpolation: 3
|
| 95 |
+
- target: torchvision.transforms.RandomCrop
|
| 96 |
+
params:
|
| 97 |
+
size: 512
|
| 98 |
+
postprocess:
|
| 99 |
+
target: ldm.data.laion.AddMask
|
| 100 |
+
params:
|
| 101 |
+
mode: "512train-large"
|
| 102 |
+
p_drop: 0.25
|
| 103 |
+
# NOTE use enough shards to avoid empty validation loops in workers
|
| 104 |
+
validation:
|
| 105 |
+
shards:
|
| 106 |
+
- "pipe:aws s3 cp s3://deep-floyd-s3/datasets/laion_cleaned-part5/{93001..94333}.tar - "
|
| 107 |
+
shuffle: 0
|
| 108 |
+
image_key: jpg
|
| 109 |
+
image_transforms:
|
| 110 |
+
- target: torchvision.transforms.Resize
|
| 111 |
+
params:
|
| 112 |
+
size: 512
|
| 113 |
+
interpolation: 3
|
| 114 |
+
- target: torchvision.transforms.CenterCrop
|
| 115 |
+
params:
|
| 116 |
+
size: 512
|
| 117 |
+
postprocess:
|
| 118 |
+
target: ldm.data.laion.AddMask
|
| 119 |
+
params:
|
| 120 |
+
mode: "512train-large"
|
| 121 |
+
p_drop: 0.25
|
| 122 |
+
|
| 123 |
+
lightning:
|
| 124 |
+
find_unused_parameters: True
|
| 125 |
+
modelcheckpoint:
|
| 126 |
+
params:
|
| 127 |
+
every_n_train_steps: 5000
|
| 128 |
+
|
| 129 |
+
callbacks:
|
| 130 |
+
metrics_over_trainsteps_checkpoint:
|
| 131 |
+
params:
|
| 132 |
+
every_n_train_steps: 10000
|
| 133 |
+
|
| 134 |
+
image_logger:
|
| 135 |
+
target: main.ImageLogger
|
| 136 |
+
params:
|
| 137 |
+
enable_autocast: False
|
| 138 |
+
disabled: False
|
| 139 |
+
batch_frequency: 1000
|
| 140 |
+
max_images: 4
|
| 141 |
+
increase_log_steps: False
|
| 142 |
+
log_first_step: False
|
| 143 |
+
log_images_kwargs:
|
| 144 |
+
use_ema_scope: False
|
| 145 |
+
inpaint: False
|
| 146 |
+
plot_progressive_rows: False
|
| 147 |
+
plot_diffusion_rows: False
|
| 148 |
+
N: 4
|
| 149 |
+
unconditional_guidance_scale: 5.0
|
| 150 |
+
unconditional_guidance_label: [""]
|
| 151 |
+
ddim_steps: 50 # todo check these out for depth2img,
|
| 152 |
+
ddim_eta: 0.0 # todo check these out for depth2img,
|
| 153 |
+
|
| 154 |
+
trainer:
|
| 155 |
+
benchmark: True
|
| 156 |
+
val_check_interval: 5000000
|
| 157 |
+
num_sanity_val_steps: 0
|
| 158 |
+
accumulate_grad_batches: 1
|